The watchdog device's timer may be queued when the platform driver
"remove" function is called.  Call `del_timer_sync` to remove it from
the queue.

Signed-off-by: Ian Abbott <[email protected]>
---
 drivers/watchdog/dw_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 1cd877b..daab90b 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -387,6 +387,8 @@ out_unmark_probed:
 
 static int dw_wdt_drv_remove(struct platform_device *pdev)
 {
+       del_timer_sync(&dw_wdt.timer);
+
        if (test_and_clear_bit(DW_WDT_RESTART_HANDLER, &dw_wdt.state))
                unregister_restart_handler(&dw_wdt.restart_handler);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to