summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorHaotian Zhang <vulab@iscas.ac.cn>2025-11-05 16:42:20 +0800
committerWim Van Sebroeck <wim@linux-watchdog.org>2025-11-15 15:29:01 +0100
commit5bcc5786a0cfa9249ccbe539833040a6285d0de3 (patch)
tree386c26667d2ce0fe64a89444554bb823e96923c8 /Documentation
parent6fbf541520025ca1825aa689fefb6c6fd818329c (diff)
watchdog: starfive: Fix resource leak in probe error path
If pm_runtime_put_sync() fails after watchdog_register_device() succeeds, the probe function jumps to err_exit without unregistering the watchdog device. This leaves the watchdog registered in the subsystem while the driver fails to load, resulting in a resource leak. Add a new error label err_unregister_wdt to properly unregister the watchdog device. Fixes: 8bc22a2f1bf0 ("watchdog: starfive: Check pm_runtime_enabled() before decrementing usage counter") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions