The patch titled Subject: drivers/rtc/interface.c: check the error after __rtc_read_time() has been added to the -mm tree. Its filename is drivers-rtc-interfacec-check-the-error-after-__rtc_read_time.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-interfacec-check-the-error-after-__rtc_read_time.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-interfacec-check-the-error-after-__rtc_read_time.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Hyogi Gim <hyogi.gim@xxxxxxx> Subject: drivers/rtc/interface.c: check the error after __rtc_read_time() In __rtc_set_alarm(), the error after __rtc_read_time() is not checked. If rtc device fail to read time, we cannot guarantee the following process. Add the verification code for returned __rtc_read_time() error. Signed-off-by: Hyogi Gim <hyogi.gim@xxxxxxx> Acked-by: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/interface.c | 2 ++ 1 file changed, 2 insertions(+) diff -puN drivers/rtc/interface.c~drivers-rtc-interfacec-check-the-error-after-__rtc_read_time drivers/rtc/interface.c --- a/drivers/rtc/interface.c~drivers-rtc-interfacec-check-the-error-after-__rtc_read_time +++ a/drivers/rtc/interface.c @@ -348,6 +348,8 @@ static int __rtc_set_alarm(struct rtc_de /* Make sure we're not setting alarms in the past */ err = __rtc_read_time(rtc, &tm); + if (err) + return err; rtc_tm_to_time(&tm, &now); if (scheduled <= now) return -ETIME; _ Patches currently in -mm which might be from hyogi.gim@xxxxxxx are drivers-rtc-interfacec-check-the-error-after-__rtc_read_time.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html