aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Jończyk <[email protected]>2021-12-10 21:01:24 +0100
committerAlexandre Belloni <[email protected]>2021-12-16 21:50:06 +0100
commitd35786b3a28dee20b12962ae2dd365892a99ed1a (patch)
tree108c1a7c50d2850b8338a91ac798e4a16b0daf10
parent454f47ff464325223129b9b5b8d0b61946ec704d (diff)
rtc: mc146818-lib: change return values of mc146818_get_time()
No function is checking mc146818_get_time() return values yet, so correct them to make them more customary. Signed-off-by: Mateusz Jończyk <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/rtc/rtc-mc146818-lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c
index dcfaf09946ee..c186c8c4982b 100644
--- a/drivers/rtc/rtc-mc146818-lib.c
+++ b/drivers/rtc/rtc-mc146818-lib.c
@@ -25,7 +25,7 @@ again:
if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) {
spin_unlock_irqrestore(&rtc_lock, flags);
memset(time, 0xff, sizeof(*time));
- return 0;
+ return -EIO;
}
/*
@@ -116,7 +116,7 @@ again:
time->tm_mon--;
- return RTC_24H;
+ return 0;
}
EXPORT_SYMBOL_GPL(mc146818_get_time);