Commit 83217f1b authored by Mario Limonciello's avatar Mario Limonciello Committed by Greg Kroah-Hartman
Browse files

rtc: Adjust failure return code for cmos_set_alarm()



commit 1311a8f0 upstream.

When mc146818_avoid_UIP() fails to return a valid value, this is because
UIP didn't clear in the timeout period. Adjust the return code in this
case to -ETIMEDOUT.

Tested-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Reviewed-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Acked-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Cc:  <stable@vger.kernel.org>
Fixes: cdedc45c ("rtc: cmos: avoid UIP when reading alarm time")
Fixes: cd17420e ("rtc: cmos: avoid UIP when writing alarm time")
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20231128053653.101798-3-mario.limonciello@amd.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b51578bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment