Skip to contentSkip to conversation

watchdog: rti-wdt: disable runtime pm in case of failure

PATCH Superseded Wang Li 2 participants 2 messages Nov 25, 2020 Watchdog device drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wang Li

author
#0 lore raw

PATCH 1/1 watchdog: rti-wdt: disable runtime pm in case of failure

In case of runtime pm failed, should disable runtime pm.

Fixes d342951bcda6 ("watchdog: rti: Simplify with dev_err_probe()")
---
 drivers/watchdog/rti_wdt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/watchdog/rti_wdt.c +4 -2
index 836319cbaca9..8885841eef4f 100644
@@ -227,8 +227,10 @@ static int rti_wdt_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(dev);
 	ret = pm_runtime_get_sync(dev);
-	if (ret)
-		return dev_err_probe(dev, ret, "runtime pm failed\n");
+	if (ret) {
+		ret = dev_err_probe(dev, ret, "runtime pm failed\n");
+		goto err_iomap;
+	}
 
 	platform_set_drvdata(pdev, wdt);
 
Signature · 1 line
2.25.4
#1 lore raw
Quoted 3 lines · Wang Li

In case of runtime pm failed, should disable runtime pm.

Fixes d342951bcda6 ("watchdog: rti: Simplify with dev_err_probe()")

The commit pointed here is wrong. The issue was not introduced there but in earlier commit.

Best regards,
Krzysztof

Quoted 5 lines
---
 drivers/watchdog/rti_wdt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)