aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-coh901331.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-19 10:23:55 -0500
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-01 04:49:41 -0500
commitab62670e57174c547abbecacf6df78d3dcf03f26 (patch)
tree5ca67c1fca5b03d229b17e2194d9ecca910dbb7a /drivers/rtc/rtc-coh901331.c
parent146d21bd9dc167d75bed4c0fdfe790db7565e99b (diff)
rtc: stop validating rtc_time after rtc_time_to_tm
rtc_time_to_tm never generates an invalid tm. It is not necessary to validate it. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-coh901331.c')
-rw-r--r--drivers/rtc/rtc-coh901331.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index cfc4141d99cd..2fc517498a5d 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -82,7 +82,7 @@ static int coh901331_read_time(struct device *dev, struct rtc_time *tm)
82 if (readl(rtap->virtbase + COH901331_VALID)) { 82 if (readl(rtap->virtbase + COH901331_VALID)) {
83 rtc_time_to_tm(readl(rtap->virtbase + COH901331_CUR_TIME), tm); 83 rtc_time_to_tm(readl(rtap->virtbase + COH901331_CUR_TIME), tm);
84 clk_disable(rtap->clk); 84 clk_disable(rtap->clk);
85 return rtc_valid_tm(tm); 85 return 0;
86 } 86 }
87 clk_disable(rtap->clk); 87 clk_disable(rtap->clk);
88 return -EINVAL; 88 return -EINVAL;