summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorDinghao Liu <dinghao.liu@zju.edu.cn>2020-05-21 10:01:41 +0200
committerWim Van Sebroeck <wim@linux-watchdog.org>2020-05-25 08:55:46 +0200
commita22573740d93f31c30b57a40b334a1ec6b789f67 (patch)
tree771b223c9d8badc68ae70a3215f8bbca0f2c9a16 /drivers/watchdog
parentwatchdog: riowd: remove unneeded semicolon (diff)
downloadlinux-a22573740d93f31c30b57a40b334a1ec6b789f67.tar.xz
linux-a22573740d93f31c30b57a40b334a1ec6b789f67.zip
watchdog: Fix runtime PM imbalance on error
When watchdog_register_device() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20200521080141.24373-1-dinghao.liu@zju.edu.cn Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/omap_wdt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 9b91882fe3c4..1616f93dfad7 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -273,6 +273,7 @@ static int omap_wdt_probe(struct platform_device *pdev)
ret = watchdog_register_device(&wdev->wdog);
if (ret) {
+ pm_runtime_put(wdev->dev);
pm_runtime_disable(wdev->dev);
return ret;
}