mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2417898b34
commit
4e80b1880c
1 changed files with 6 additions and 1 deletions
|
|
@ -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 a new issue