From: Javier Martinez Canillas Date: Wed, 27 Jan 2016 03:36:37 +0000 (-0300) Subject: rtc: max77686: Fix max77686_rtc_read_alarm() return value X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7cdffeb534360609d57a39403ee951e08dcffbe7;p=linux-beck.git rtc: max77686: Fix max77686_rtc_read_alarm() return value The function is always returning zero even in case of failures since the ret value was not propagated to the callers. Fix the error path. Reported-by: Krzysztof Kozlowski Signed-off-by: Javier Martinez Canillas Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Acked-by: Laxman Dewangan Reviewed-by: Andi Shyti Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c index 7184a0eda793..6653c3d11b66 100644 --- a/drivers/rtc/rtc-max77686.c +++ b/drivers/rtc/rtc-max77686.c @@ -235,7 +235,7 @@ static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) out: mutex_unlock(&info->lock); - return 0; + return ret; } static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)