summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2018-11-14 20:19:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 10:51:35 +0300
commite1669a130f681c47b1ee0d7838c612fdc4ae0a33 (patch)
treee0fa5cc46b8d1289b18459c291cdb8e914284a83 /drivers/rtc
parenta346307acbc477fd82c64859532482248dd8d601 (diff)
downloadlinux-e1669a130f681c47b1ee0d7838c612fdc4ae0a33.tar.xz
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-max8997.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
index 08c661a332ec..20e50d9fdf88 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -215,7 +215,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)