rtc: pm8xxx: remove useless message
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 20 Feb 2018 23:10:41 +0000 (00:10 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 2 Mar 2018 09:12:23 +0000 (10:12 +0100)
It is not necessary to print a message when the time is invalid as
userspace will already get an error (and an optional dev_dbg message).

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

index fac835530671ff003657a5807f750a73586be87e..8e0128796824bc94128c898a26f88b0cd9bf603d 100644 (file)
@@ -190,12 +190,6 @@ static int pm8xxx_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
        rtc_time_to_tm(secs, tm);
 
-       rc = rtc_valid_tm(tm);
-       if (rc < 0) {
-               dev_err(dev, "Invalid time read from RTC\n");
-               return rc;
-       }
-
        dev_dbg(dev, "secs = %lu, h:m:s == %d:%d:%d, d/m/y = %d/%d/%d\n",
                secs, tm->tm_hour, tm->tm_min, tm->tm_sec,
                tm->tm_mday, tm->tm_mon, tm->tm_year);