[PATCH v4 1/6] watchdog: w83627hf_wdt: Fix watchdog identity truncation

From: Paul Louvel

Date: Tue Oct 13 2026 - 12:48:01 EST


The identity field in struct watchdog_info is only 32 bytes in size, but
the identity could be at most 33 bytes in this driver, resulting in
truncation.
Remove the "Watchdog" suffix, as this is implied that the device is a
watchdog if a user request his identity.

Cc: <stable@xxxxxxxxxxxxxxx>
Fixes: 3d6757a640f8 ("watchdog: w83627hf_wdt: Report the probed chip name via WDIOC_GETSUPPORT")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202610080027.3OsJDwfo-lkp@xxxxxxxxx/
Signed-off-by: Paul Louvel <paul.louvel@xxxxxxxxxxx>
---
drivers/watchdog/w83627hf_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
index db77599e43a0..0fc7648ef337 100644
--- a/drivers/watchdog/w83627hf_wdt.c
+++ b/drivers/watchdog/w83627hf_wdt.c
@@ -525,7 +525,7 @@ static int __init wdt_init(void)
pr_info("WDT driver for %s Super I/O chip initialising\n",
chip_name[chip]);

- snprintf(wdt_info.identity, sizeof(wdt_info.identity), "%s Watchdog",
+ snprintf(wdt_info.identity, sizeof(wdt_info.identity), "%s",
chip_name[chip]);

watchdog_init_timeout(&wdt_dev, timeout, NULL);

--
2.56.0