mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
5e31896a33
commit
a22573740d
@@ -273,6 +273,7 @@ static int omap_wdt_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
ret = watchdog_register_device(&wdev->wdog);
|
ret = watchdog_register_device(&wdev->wdog);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
pm_runtime_put(wdev->dev);
|
||||||
pm_runtime_disable(wdev->dev);
|
pm_runtime_disable(wdev->dev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user