From: Krzysztof Kozlowski Date: Thu, 16 Apr 2015 19:46:08 +0000 (-0700) Subject: drivers/rtc/rtc-s3c.c: remove one superfluous rtc_valid_tm() check X-Git-Tag: submit/tizen/20150819.053504~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9c9a3e725fb656d1cb1bfaea635bb26f15191bf;p=platform%2Fkernel%2Flinux-exynos.git drivers/rtc/rtc-s3c.c: remove one superfluous rtc_valid_tm() check 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(). Change-Id: I256905f20e4dfc95ad5dac17234ccd4c1df1b460 Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Cc: Alexandre Belloni Cc: Alessandro Zummo Cc: Marek Szyprowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index a313b9b5a27e..76cbad7a99d3 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -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;