summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-max8997.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2018-11-14 18:19:51 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-11-22 18:11:35 +0100
commit41ef3878203cd9218d92eaa07df4b85a2cb128fb (patch)
tree75340578b09e9e4295a6b6bb76b90a22161f481c /drivers/rtc/rtc-max8997.c
parent41c9e132c5cc3e5f28cf44032ff82f7614a42989 (diff)
rtc: max8997: Fix the returned value in case of error in 'max8997_rtc_read_alarm()'
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>
Diffstat (limited to 'drivers/rtc/rtc-max8997.c')
-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)