Skip to contentSkip to conversation

watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function

PATCH New Miaoqian Lin 1 participant 1 message Jan 5, 2022 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function

If the probe fails, we should use pm_runtime_disable() to balance pm_runtime_enable().

Fixes 2d63908 ("watchdog: Add K3 RTI watchdog support")
---
 drivers/watchdog/rti_wdt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/rti_wdt.c +1 -0
index 117bc2a8eb0a..db843f825860 100644
@@ -228,6 +228,7 @@ static int rti_wdt_probe(struct platform_device *pdev)
 	ret = pm_runtime_get_sync(dev);
 	if (ret) {
 		pm_runtime_put_noidle(dev);
+		pm_runtime_disable(&pdev->dev);
 		return dev_err_probe(dev, ret, "runtime pm failed\n");
 	}
 
Signature · 1 line
2.17.1