]> Git Repo - linux.git/commitdiff
watchdog: Fix runtime PM imbalance on error
authorDinghao Liu <[email protected]>
Thu, 21 May 2020 08:01:41 +0000 (16:01 +0800)
committerWim Van Sebroeck <[email protected]>
Mon, 25 May 2020 06:55:46 +0000 (08:55 +0200)
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 <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
drivers/watchdog/omap_wdt.c

index 9b91882fe3c411dcac5c2f027cb0c54074828cc8..1616f93dfad7fcdccf7d74a7dc18d979a1643e7a 100644 (file)
@@ -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;
        }
This page took 0.048384 seconds and 4 git commands to generate.