]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: wdat_wdt: Fix ACPI table leak in probe function
authorHaotian Zhang <vulab@iscas.ac.cn>
Thu, 13 Nov 2025 02:30:32 +0000 (10:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:59 +0000 (13:54 +0100)
commit0c1646149f4ed9f8c0f55ce8348b2f2216c5fcc0
tree71b09aa2c7baa92cf62670f6805a79376159b46d
parent30ce906557a21adef4cba5901c8e995dc18263a9
watchdog: wdat_wdt: Fix ACPI table leak in probe function

[ Upstream commit 25c0b472eab8379683d4eef681185c104bed8ffd ]

wdat_wdt_probe() calls acpi_get_table() to obtain the WDAT ACPI table but
never calls acpi_put_table() on any paths. This causes a permanent ACPI
table memory leak.

Add a single cleanup path which calls acpi_put_table() to ensure
the ACPI table is always released.

Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/wdat_wdt.c