Skip to content

Commit

Permalink
rtc: max77686: Fix max77686_rtc_read_alarm() return value
Browse files Browse the repository at this point in the history
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 <k.kozlowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Javier Martinez Canillas authored and Alexandre Belloni committed Feb 4, 2016
1 parent 92e963f commit 7cdffeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7cdffeb

Please sign in to comment.