rtc: ab8500: remove useless check
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 24 Sep 2018 14:49:02 +0000 (16:49 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 28 Sep 2018 12:36:49 +0000 (14:36 +0200)
rtc_time_to_tm always rturns a valid tm, there is no need to validate it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ab8500.c

index 2e2671b..1f0cbd5 100644 (file)
@@ -170,7 +170,7 @@ static int ab8500_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 
        rtc_time_to_tm(secs, &alarm->time);
 
-       return rtc_valid_tm(&alarm->time);
+       return 0;
 }
 
 static int ab8500_rtc_irq_enable(struct device *dev, unsigned int enabled)