Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <mat.jonczyk@o2.pl>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211210200131.153887-3-mat.jonczyk@o2.pl

authored by

Mateusz Jończyk and committed by
Alexandre Belloni
d35786b3 454f47ff

+2 -2
+2 -2
drivers/rtc/rtc-mc146818-lib.c
··· 25 25 if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) { 26 26 spin_unlock_irqrestore(&rtc_lock, flags); 27 27 memset(time, 0xff, sizeof(*time)); 28 - return 0; 28 + return -EIO; 29 29 } 30 30 31 31 /* ··· 116 116 117 117 time->tm_mon--; 118 118 119 - return RTC_24H; 119 + return 0; 120 120 } 121 121 EXPORT_SYMBOL_GPL(mc146818_get_time); 122 122