diff options
| author | Justin Hibbits <jhibbits@FreeBSD.org> | 2026-03-13 18:49:17 +0000 |
|---|---|---|
| committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2026-03-13 18:49:17 +0000 |
| commit | 703901bce15bdd746cb20ab3fc88f5859924cf76 (patch) | |
| tree | e1c20fe67a6a6fb33b61569b2b2285294ca2a378 | |
| parent | fa341366b1de86ed97e909bfd10241d590212fe2 (diff) | |
i6300esbwd: Set error appropriately on event
Per the watchdog driver contract, if the driver successfully arms the
watchdog it must set error to 0, and if it's unable to arm the watchdog
it must leave error alone.
Sponsored by: Hewlett Packard Enterprise
| -rw-r--r-- | sys/dev/ichwd/i6300esbwd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ichwd/i6300esbwd.c b/sys/dev/ichwd/i6300esbwd.c index 03d504a350aa..e810dcd888c4 100644 --- a/sys/dev/ichwd/i6300esbwd.c +++ b/sys/dev/ichwd/i6300esbwd.c @@ -112,7 +112,6 @@ i6300esbwd_event(void *arg, unsigned int cmd, int *error) cmd &= WD_INTERVAL; if (cmd != 0 && (cmd < WD_TO_1MS || (cmd - WD_TO_1MS) >= WDT_PRELOAD_BIT)) { - *error = EINVAL; return; } timeout = 1 << (cmd - WD_TO_1MS); @@ -148,6 +147,8 @@ i6300esbwd_event(void *arg, unsigned int cmd, int *error) regval = i6300esbwd_lock_read(sc); sc->locked = regval & WDT_LOCK; } + /* Set error to 0 to indicate we did something. */ + *error = 0; } static int |
