Skip to content

Commit

Permalink
drivers/rtc/rtc-s3c.c: remove one superfluous rtc_valid_tm() check
Browse files Browse the repository at this point in the history
s3c_rtc_gettime() already returns the result of rtc_valid_tm() on the
obtained time so get rid of another call to rtc_valid_tm().

Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
krzk authored and torvalds committed Apr 17, 2015
1 parent 5d9094b commit 492da68
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, 1);

/* Check RTC Time */
s3c_rtc_gettime(&pdev->dev, &rtc_tm);

if (rtc_valid_tm(&rtc_tm)) {
if (s3c_rtc_gettime(&pdev->dev, &rtc_tm)) {
rtc_tm.tm_year = 100;
rtc_tm.tm_mon = 0;
rtc_tm.tm_mday = 1;
Expand Down

0 comments on commit 492da68

Please sign in to comment.