Skip to content

Commit a225737

Browse files
dinghaoliuWim Van Sebroeck
authored andcommitted
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 <[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]>
1 parent 5e31896 commit a225737

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/watchdog/omap_wdt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ static int omap_wdt_probe(struct platform_device *pdev)
273273

274274
ret = watchdog_register_device(&wdev->wdog);
275275
if (ret) {
276+
pm_runtime_put(wdev->dev);
276277
pm_runtime_disable(wdev->dev);
277278
return ret;
278279
}

0 commit comments

Comments
 (0)