Patch "rtc: mc146818-lib: change return values of mc146818_get_time()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rtc: mc146818-lib: change return values of mc146818_get_time()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rtc-mc146818-lib-change-return-values-of-mc146818_ge.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit dcb86a8ba704e221a6401c14de2f0d35b725235f
Author: Mateusz Jończyk <mat.jonczyk@xxxxx>
Date:   Fri Dec 10 21:01:24 2021 +0100

    rtc: mc146818-lib: change return values of mc146818_get_time()
    
    [ Upstream commit d35786b3a28dee20b12962ae2dd365892a99ed1a ]
    
    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@xxxxx>
    Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
    Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211210200131.153887-3-mat.jonczyk@xxxxx
    Stable-dep-of: cd17420ebea5 ("rtc: cmos: avoid UIP when writing alarm time")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c
index 6ed2cd5d2bba..6262f0680f13 100644
--- a/drivers/rtc/rtc-mc146818-lib.c
+++ b/drivers/rtc/rtc-mc146818-lib.c
@@ -25,7 +25,7 @@ unsigned int mc146818_get_time(struct rtc_time *time)
 	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 @@ unsigned int mc146818_get_time(struct rtc_time *time)
 
 	time->tm_mon--;
 
-	return RTC_24H;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(mc146818_get_time);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux