diff options
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 5813fa52c3d4..5b2717f5dafa 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -348,6 +348,8 @@ static int __rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) | |||
348 | 348 | ||
349 | /* Make sure we're not setting alarms in the past */ | 349 | /* Make sure we're not setting alarms in the past */ |
350 | err = __rtc_read_time(rtc, &tm); | 350 | err = __rtc_read_time(rtc, &tm); |
351 | if (err) | ||
352 | return err; | ||
351 | rtc_tm_to_time(&tm, &now); | 353 | rtc_tm_to_time(&tm, &now); |
352 | if (scheduled <= now) | 354 | if (scheduled <= now) |
353 | return -ETIME; | 355 | return -ETIME; |