summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2018-11-14 18:19:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-21 10:41:03 +0100
commit2ce7ec809496c458221d6ca4bbdb207f6ca06cf8 (patch)
treef2104880361ef69449da4fe96a0e1e4b5cc0e19e /drivers/rtc
parentd518e7b3f0ba3bc919daded8452be088be4e6961 (diff)
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 db984d4bf952..4cce5bd448f6 100644
--- a/drivers/rtc/rtc-max8997.c
+++ b/drivers/rtc/rtc-max8997.c
@@ -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)