linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rtc: s5m: check the return value of s5m8767_rtc_init_reg()
@ 2021-01-07 13:42 Bartosz Golaszewski
  2021-01-07 13:42 ` [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device() Bartosz Golaszewski
  0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2021-01-07 13:42 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Alessandro Zummo,
	Alexandre Belloni
  Cc: linux-kernel, linux-samsung-soc, linux-rtc, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

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

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 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 eb9dde4095a9..e0011d3cf61b 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-07 18:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 13:42 [PATCH 1/2] rtc: s5m: check the return value of s5m8767_rtc_init_reg() Bartosz Golaszewski
2021-01-07 13:42 ` [PATCH v3 2/2] rtc: s5m: use devm_i2c_new_dummy_device() Bartosz Golaszewski
2021-01-07 15:00   ` kernel test robot
2021-01-07 18:20   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).