Commit ac288a7b authored by Zhao Qiang's avatar Zhao Qiang Committed by Wim Van Sebroeck
Browse files

watchdog: stop wdd when watchdog hw running in reboot_notifier



In watchdog_reboot_notifier, wdd should be stopped when the device
is in hw_running state

Signed-off-by: default avatarZhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210114082651.17162-1-qiang.zhao@nxp.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent fbf37605
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static int watchdog_reboot_notifier(struct notifier_block *nb,

	wdd = container_of(nb, struct watchdog_device, reboot_nb);
	if (code == SYS_DOWN || code == SYS_HALT) {
		if (watchdog_active(wdd)) {
		if (watchdog_active(wdd) || watchdog_hw_running(wdd)) {
			int ret;

			ret = wdd->ops->stop(wdd);