Skip to content

Commit

Permalink
watchdog: rti-wdt: balance pm runtime enable calls
Browse files Browse the repository at this point in the history
PM runtime should be disabled in the fail path of probe and when
the driver is removed.

Fixes: 2d63908 ("watchdog: Add K3 RTI watchdog support")
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200717132958.14304-5-t-kristo@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  • Loading branch information
Tero Kristo authored and Wim Van Sebroeck committed Aug 5, 2020
1 parent 5527483 commit d5b29c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/watchdog/rti_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static int rti_wdt_probe(struct platform_device *pdev)

err_iomap:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);

return ret;
}
Expand All @@ -313,6 +314,7 @@ static int rti_wdt_remove(struct platform_device *pdev)

watchdog_unregister_device(&wdt->wdd);
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);

return 0;
}
Expand Down

0 comments on commit d5b29c2

Please sign in to comment.