summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-07-09 03:00:45 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 21:33:25 +0400
commit4e80b1880c5a31d051d1e4a7377dec0a20701c23 (patch)
tree56c3d5d93ac4d4dfc84a06723ef214a93480b9e8 /drivers/rtc
parent2417898b34ad3fbf2f31771c97ba87792bf97f0c (diff)
downloadlinux-4e80b1880c5a31d051d1e4a7377dec0a20701c23.tar.xz
drivers/rtc/rtc-stmp3xxx.c: check the return value from stmp_reset_block()
stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-stmp3xxx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c
index 90a3e864b8fe..767fee2ab340 100644
--- a/drivers/rtc/rtc-stmp3xxx.c
+++ b/drivers/rtc/rtc-stmp3xxx.c
@@ -261,7 +261,12 @@ static int stmp3xxx_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, rtc_data);
- stmp_reset_block(rtc_data->io);
+ err = stmp_reset_block(rtc_data->io);
+ if (err) {
+ dev_err(&pdev->dev, "stmp_reset_block failed: %d\n", err);
+ return err;
+ }
+
writel(STMP3XXX_RTC_PERSISTENT0_ALARM_EN |
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE_EN |
STMP3XXX_RTC_PERSISTENT0_ALARM_WAKE,