summaryrefslogtreecommitdiff
path: root/drivers/watchdog/watchdog_pretimeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/watchdog_pretimeout.c')
-rw-r--r--drivers/watchdog/watchdog_pretimeout.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/watchdog/watchdog_pretimeout.c b/drivers/watchdog/watchdog_pretimeout.c
index 19eb2ed2c7cb..02e09b9e396d 100644
--- a/drivers/watchdog/watchdog_pretimeout.c
+++ b/drivers/watchdog/watchdog_pretimeout.c
@@ -167,6 +167,8 @@ void watchdog_unregister_governor(struct watchdog_governor *gov)
}
spin_lock_irq(&pretimeout_lock);
+ if (default_gov == gov)
+ default_gov = NULL;
list_for_each_entry(p, &pretimeout_list, entry)
if (p->wdd->gov == gov)
p->wdd->gov = default_gov;