[PATCH 1/2] mfd: stpmic1: warn if reset reason detection fails
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Sep 3 06:24:43 EDT 2020
stpmic1_set_reset_reason returns an error code, but so far we didn't
check it. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/watchdog/stpmic1_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c
index 458c5c16a3ff..12280f144762 100644
--- a/drivers/watchdog/stpmic1_wdt.c
+++ b/drivers/watchdog/stpmic1_wdt.c
@@ -200,7 +200,7 @@ static int stpmic1_wdt_probe(struct device_d *dev)
if (ret)
dev_warn(dev, "Cannot register poweroff handler\n");
- stpmic1_set_reset_reason(wdt->regmap);
+ ret = stpmic1_set_reset_reason(wdt->regmap);
if (ret)
dev_warn(dev, "Cannot query reset reason\n");
--
2.28.0
More information about the barebox
mailing list