Re: [PATCH] platform/x86: wdat_wdt: Fix ACPI table leak on probe errors

From: Guenter Roeck

Date: Wed Nov 12 2025 - 18:10:08 EST


On 11/10/25 19:28, Haotian Zhang wrote:
wdat_wdt_probe() calls acpi_get_table() to obtain the WDAT ACPI table but
returns early on multiple error paths without calling acpi_put_table().
This causes a permanent ACPI table memory leak if the driver probe fails.

Add a single cleanup path which calls acpi_put_table() and redirect all
error returns to it, ensuring the ACPI table is always released.

Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
Signed-off-by: Haotian Zhang <vulab@xxxxxxxxxxx>

I just noticed that the subject line starts with "platform/x86:" instead of "watchdog:".

Why ?

Guenter