rtc: tegra: stop validating rtc_time in .set_time
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 21 Feb 2018 10:03:49 +0000 (11:03 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 2 Mar 2018 09:12:22 +0000 (10:12 +0100)
The RTC core is always validating the rtc_time struct before calling
.set_time. It is not necessary to do it again in .set_time.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-tegra.c

index d30d57b..66efff6 100644 (file)
@@ -144,10 +144,6 @@ static int tegra_rtc_set_time(struct device *dev, struct rtc_time *tm)
        int ret;
 
        /* convert tm to seconds. */
-       ret = rtc_valid_tm(tm);
-       if (ret)
-               return ret;
-
        rtc_tm_to_time(tm, &sec);
 
        dev_vdbg(dev, "time set to %lu. %d/%d/%d %d:%02u:%02u\n",