Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Bartosz Golaszewski and committed by
Alexandre Belloni
3be95d27 7db7ad08

+2
+2
drivers/rtc/rtc-s5m.c
··· 791 791 platform_set_drvdata(pdev, info); 792 792 793 793 ret = s5m8767_rtc_init_reg(info); 794 + if (ret) 795 + return ret; 794 796 795 797 device_init_wakeup(&pdev->dev, 1); 796 798