Thread (6 messages) 6 messages, 3 authors, 2021-01-16

[PATCH v5 3/3] rtc: s5m: check the return value of s5m8767_rtc_init_reg()

From: Bartosz Golaszewski <hidden>
Date: 2021-01-14 10:24:03
Also in: linux-samsung-soc, lkml
Subsystem: real time clock (rtc) subsystem, samsung multifunction pmic device drivers, the rest · Maintainers: Alexandre Belloni, Krzysztof Kozlowski, Linus Torvalds

From: Bartosz Golaszewski <redacted>

This function can fail if regmap operations fail so check its return
value in probe().

Signed-off-by: Bartosz Golaszewski <redacted>
---
 drivers/rtc/rtc-s5m.c | 2 ++
 1 file changed, 2 insertions(+)
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);
 
-- 
2.29.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help