git: 703901bce15b - main - i6300esbwd: Set error appropriately on event
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Mar 2026 18:54:34 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=703901bce15bdd746cb20ab3fc88f5859924cf76
commit 703901bce15bdd746cb20ab3fc88f5859924cf76
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2026-03-13 18:49:17 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2026-03-13 18:49:17 +0000
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
---
sys/dev/ichwd/i6300esbwd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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