aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/rtc-ds1685.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
index 29b461c76072..803869c7d7c2 100644
--- a/drivers/rtc/rtc-ds1685.c
+++ b/drivers/rtc/rtc-ds1685.c
@@ -1610,7 +1610,7 @@ ds1685_rtc_sysfs_time_regs_show(struct device *dev,
1610 ds1685_rtc_sysfs_time_regs_lookup(attr->attr.name, false); 1610 ds1685_rtc_sysfs_time_regs_lookup(attr->attr.name, false);
1611 1611
1612 /* Make sure we actually matched something. */ 1612 /* Make sure we actually matched something. */
1613 if (!bcd_reg_info && !bin_reg_info) 1613 if (!bcd_reg_info || !bin_reg_info)
1614 return -EINVAL; 1614 return -EINVAL;
1615 1615
1616 /* bcd_reg_info->reg == bin_reg_info->reg. */ 1616 /* bcd_reg_info->reg == bin_reg_info->reg. */
@@ -1648,7 +1648,7 @@ ds1685_rtc_sysfs_time_regs_store(struct device *dev,
1648 return -EINVAL; 1648 return -EINVAL;
1649 1649
1650 /* Make sure we actually matched something. */ 1650 /* Make sure we actually matched something. */
1651 if (!bcd_reg_info && !bin_reg_info) 1651 if (!bcd_reg_info || !bin_reg_info)
1652 return -EINVAL; 1652 return -EINVAL;
1653 1653
1654 /* Check for a valid range. */ 1654 /* Check for a valid range. */