aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2015-04-16 15:46:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:04:02 -0400
commit492da68c8c3babc573208e057a9011d9489f2b5a (patch)
tree2bfdc39cfbf24081b10b0227b157b62d98700fc8 /drivers/rtc
parent5d9094b6c7fc87d1909143540c1e2fddde9129b3 (diff)
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(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-s3c.c4
1 files changed, 1 insertions, 3 deletions
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)
497 device_init_wakeup(&pdev->dev, 1); 497 device_init_wakeup(&pdev->dev, 1);
498 498
499 /* Check RTC Time */ 499 /* Check RTC Time */
500 s3c_rtc_gettime(&pdev->dev, &rtc_tm); 500 if (s3c_rtc_gettime(&pdev->dev, &rtc_tm)) {
501
502 if (rtc_valid_tm(&rtc_tm)) {
503 rtc_tm.tm_year = 100; 501 rtc_tm.tm_year = 100;
504 rtc_tm.tm_mon = 0; 502 rtc_tm.tm_mon = 0;
505 rtc_tm.tm_mday = 1; 503 rtc_tm.tm_mday = 1;