Skip to contentSkip to conversation

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

PATCH In review Wang Li 3 participants 3 messages Nov 25, 2020 Watchdog device drivers

lore
Share & tools
lore

Wang Li

author
#0 lore raw

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

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

Fixes 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")

---
Changelog:
v2
- Change the fix tag.

---
 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
Reviewed-by on v2 1/1
#1 lore raw
Quoted 5 lines · Wang Li

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

Fixes 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Quoted 8 lines

---
Changelog:
v2
- Change the fix tag.

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

Best regards,
Krzysztof

maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Wang Li
Quoted 5 lines · Wang Li

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

Fixes 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Quoted 28 lines

---
Changelog:
v2
- Change the fix tag.

---
 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