diff options
-rw-r--r-- | kernel/watchdog.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 568ba64..284f0e6 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -914,13 +914,14 @@ int proc_watchdog_thresh(struct ctl_table *table, int write, goto out; /* - * Update the sample period. - * Restore 'watchdog_thresh' on failure. + * Update the sample period. Restore on failure. */ set_sample_period(); err = proc_watchdog_update(); - if (err) + if (err) { watchdog_thresh = old; + set_sample_period(); + } out: mutex_unlock(&watchdog_proc_mutex); return err; |