summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-r7301.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-21 00:18:23 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-02 10:12:18 +0100
commit50a9a35ac6a6466814c23e6178d9babefbfca71f (patch)
tree06314396cf68be6c6306d87cf825f6cf23b36d7d /drivers/rtc/rtc-r7301.c
parentrtc: nuc900: stop validating rtc_time in .read_time (diff)
downloadlinux-50a9a35ac6a6466814c23e6178d9babefbfca71f.tar.xz
linux-50a9a35ac6a6466814c23e6178d9babefbfca71f.zip
rtc: r7301: stop validating rtc_time in .read_time
The RTC core is always calling rtc_valid_tm after the read_time callback. It is not necessary to call it just before returning from the callback. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-r7301.c')
-rw-r--r--drivers/rtc/rtc-r7301.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-r7301.c b/drivers/rtc/rtc-r7301.c
index 500e8c8a2605..169704b2ce13 100644
--- a/drivers/rtc/rtc-r7301.c
+++ b/drivers/rtc/rtc-r7301.c
@@ -224,7 +224,7 @@ static int rtc7301_read_time(struct device *dev, struct rtc_time *tm)
spin_unlock_irqrestore(&priv->lock, flags);
- return err ? err : rtc_valid_tm(tm);
+ return err;
}
static int rtc7301_set_time(struct device *dev, struct rtc_time *tm)