Skip to content

Commit 966301a

Browse files
Xunlei Pangjohnstultz-work
authored andcommitted
rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()
rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Cc: pang.xunlei <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Signed-off-by: Xunlei Pang <[email protected]> Signed-off-by: John Stultz <[email protected]>
1 parent a6d6e1c commit 966301a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/rtc/hctosys.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ static int __init rtc_hctosys(void)
4545

4646
}
4747

48-
err = rtc_valid_tm(&tm);
49-
if (err) {
50-
dev_err(rtc->dev.parent,
51-
"hctosys: invalid date/time\n");
52-
goto err_invalid;
53-
}
54-
5548
tv64.tv_sec = rtc_tm_to_time64(&tm);
5649

5750
err = do_settimeofday64(&tv64);
@@ -63,7 +56,6 @@ static int __init rtc_hctosys(void)
6356
tm.tm_hour, tm.tm_min, tm.tm_sec,
6457
(long long) tv64.tv_sec);
6558

66-
err_invalid:
6759
err_read:
6860
rtc_class_close(rtc);
6961

0 commit comments

Comments
 (0)