summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ds1302.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index 7811b357ed70..283e653fa189 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -53,7 +53,7 @@ static int ds1302_rtc_set_time(struct device *dev, struct rtc_time *time)
status = spi_write_then_read(spi, buf, 2,
NULL, 0);
- if (!status)
+ if (status)
return status;
/* Write registers starting at the first time/date address. */