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
This commit is contained in:
Bartosz Golaszewski 2021-01-14 11:22:19 +01:00 committed by Alexandre Belloni
parent 7db7ad0817
commit 3be95d2774

View File

@ -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);