Skip to content

Commit

Permalink
rtc: Remove redundant rtc_valid_tm() from rtc_hctosys()
Browse files Browse the repository at this point in the history
rtc_read_time() has already judged valid tm by rtc_valid_tm(),
so just remove it.

Cc: pang.xunlei <pang.xunlei@linaro.org>
Cc: Arnd Bergmann <arnd.bergmann@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
  • Loading branch information
Xunlei Pang authored and John Stultz committed Jan 24, 2015
1 parent a6d6e1c commit 966301a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/rtc/hctosys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 966301a

Please sign in to comment.