mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
[ Upstream commit 41ef387820 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d518e7b3f0
commit
2ce7ec8094
@@ -221,7 +221,7 @@ static int max8997_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
|
||||
|
||||
out:
|
||||
mutex_unlock(&info->lock);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int max8997_rtc_stop_alarm(struct max8997_rtc_info *info)
|
||||
|
||||
Reference in New Issue
Block a user