rtc: rx8581: remove useless message
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 20 Feb 2018 23:25:18 +0000 (00:25 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 2 Mar 2018 09:12:24 +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-rx8581.c

index 9998d79..32caadf 100644 (file)
@@ -164,11 +164,7 @@ static int rx8581_get_datetime(struct i2c_client *client, struct rtc_time *tm)
                tm->tm_sec, tm->tm_min, tm->tm_hour,
                tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
 
-       err = rtc_valid_tm(tm);
-       if (err < 0)
-               dev_err(&client->dev, "retrieved date/time is not valid.\n");
-
-       return err;
+       return 0;
 }
 
 static int rx8581_set_datetime(struct i2c_client *client, struct rtc_time *tm)