OSDN Git Service

rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 14 Nov 2018 17:19:51 +0000 (18:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:34:33 +0000 (10:34 +0100)
commit97b54c928c8bb16d98014e10b54c72bd184e784a
treec10e84107fce36809bf33c9b16830a3489c0dfbd
parent1e3429b11c5f1ff40b41be0b1c81e584376faee5
rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'

[ Upstream commit 41ef3878203cd9218d92eaa07df4b85a2cb128fb ]

In case of error, we return 0.
This is spurious and not consistent with the other functions of the driver.
Propagate the error code instead.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-max8997.c