Commit d35786b3 authored by Mateusz Jończyk's avatar Mateusz Jończyk Committed by Alexandre Belloni

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: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211210200131.153887-3-mat.jonczyk@o2.pl
parent 454f47ff
...@@ -25,7 +25,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) ...@@ -25,7 +25,7 @@ unsigned int mc146818_get_time(struct rtc_time *time)
if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) { if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) {
spin_unlock_irqrestore(&rtc_lock, flags); spin_unlock_irqrestore(&rtc_lock, flags);
memset(time, 0xff, sizeof(*time)); memset(time, 0xff, sizeof(*time));
return 0; return -EIO;
} }
/* /*
...@@ -116,7 +116,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) ...@@ -116,7 +116,7 @@ unsigned int mc146818_get_time(struct rtc_time *time)
time->tm_mon--; time->tm_mon--;
return RTC_24H; return 0;
} }
EXPORT_SYMBOL_GPL(mc146818_get_time); EXPORT_SYMBOL_GPL(mc146818_get_time);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment