diff mbox

[4/5] rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()

Message ID 1421893915-19309-4-git-send-email-pang.xunlei@linaro.org
State Superseded
Headers show

Commit Message

pang.xunlei Jan. 22, 2015, 2:31 a.m. UTC
rtc_read_time() has already judged valid tm by rtc_valid_tm(),
so just remove it.

Reviewed-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Arnd Bergmann <arnd.bergmann@linaro.org>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
 drivers/rtc/hctosys.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox

Patch

diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c
index 2153b52..6c719f2 100644
--- a/drivers/rtc/hctosys.c
+++ b/drivers/rtc/hctosys.c
@@ -45,13 +45,6 @@  static int __init rtc_hctosys(void)
 
 	}
 
-	err = rtc_valid_tm(&tm);
-	if (err) {
-		dev_err(rtc->dev.parent,
-			"hctosys: invalid date/time\n");
-		goto err_invalid;
-	}
-
 	tv64.tv_sec = rtc_tm_to_time64(&tm);
 
 	err = do_settimeofday64(&tv64);
@@ -63,7 +56,6 @@  static int __init rtc_hctosys(void)
 		tm.tm_hour, tm.tm_min, tm.tm_sec,
 		(long long) tv64.tv_sec);
 
-err_invalid:
 err_read:
 	rtc_class_close(rtc);