diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2021-01-14 13:22:19 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2021-01-17 01:19:12 +0300 |
commit | 3be95d277484117f248b2f7e8cb8d14cb38dbb04 (patch) | |
tree | e7eddaf9f42fbaddbb52289476b2518e83bddad8 /drivers/rtc/rtc-s5m.c | |
parent | 7db7ad0817fe7d3c6fcbd9402deb7509b2851f06 (diff) | |
download | linux-3be95d277484117f248b2f7e8cb8d14cb38dbb04.tar.xz |
rtc: s5m: check the return value of s5m8767_rtc_init_reg()
This function can fail if regmap operations fail so check its return
value in probe().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210114102219.23682-4-brgl@bgdev.pl
Diffstat (limited to 'drivers/rtc/rtc-s5m.c')
-rw-r--r-- | drivers/rtc/rtc-s5m.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index 858d5f0e860f..80b66f16db89 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -791,6 +791,8 @@ static int s5m_rtc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, info); ret = s5m8767_rtc_init_reg(info); + if (ret) + return ret; device_init_wakeup(&pdev->dev, 1); |