From a22573740d93f31c30b57a40b334a1ec6b789f67 Mon Sep 17 00:00:00 2001 From: Dinghao Liu Date: Thu, 21 May 2020 16:01:41 +0800 Subject: 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 Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200521080141.24373-1-dinghao.liu@zju.edu.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- drivers/watchdog/omap_wdt.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/watchdog') 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; } -- cgit v1.2.3-70-g09d2