diff mbox series

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

Message ID 20201125082956.3325066-1-wangli74@huawei.com
State Superseded
Headers show
Series [v2] watchdog: rti-wdt: disable runtime pm in case of failure | expand

Commit Message

Wang Li Nov. 25, 2020, 8:29 a.m. UTC
In case of runtime pm failed, should disable runtime pm.

Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Li <wangli74@huawei.com>
---
Changelog:
v2
- Change the fix tag.
---
 drivers/watchdog/rti_wdt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/watchdog/rti_wdt.c b/drivers/watchdog/rti_wdt.c
index 836319cbaca9..8885841eef4f 100644
--- a/drivers/watchdog/rti_wdt.c
+++ b/drivers/watchdog/rti_wdt.c
@@ -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);