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>
This commit is contained in:
parent
2417898b34
commit
4e80b1880c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue