rtc: jz4740: remove useless check
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Apr 2019 09:28:17 +0000 (11:28 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Apr 2019 09:50:17 +0000 (11:50 +0200)
rtc_time64_to_tm always returns a valid tm, it is not necessary to validate
it.

Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-jz4740.c

index 4283766..f2b8d65 100644 (file)
@@ -198,7 +198,7 @@ static int jz4740_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 
        rtc_time64_to_tm(secs, &alrm->time);
 
-       return rtc_valid_tm(&alrm->time);
+       return 0;
 }
 
 static int jz4740_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)