diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index 38c1e63a8e2c..2948fe52e093 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -314,10 +314,7 @@ static int ___watchdog_register_device(struct watchdog_device *wdd) /* Module parameter to force watchdog policy on reboot. */ if (stop_on_reboot != -1) { - if (stop_on_reboot) - set_bit(WDOG_STOP_ON_REBOOT, &wdd->status); - else - clear_bit(WDOG_STOP_ON_REBOOT, &wdd->status); + assign_bit(WDOG_STOP_ON_REBOOT, &wdd->status, stop_on_reboot); } if (test_bit(WDOG_STOP_ON_REBOOT, &wdd->status)) {