Re: [PATCH] watchdog: sprd_wdt: Remove redundant sprd_wdt_disable() on register failure
From: Guenter Roeck
Date: Mon Feb 23 2026 - 10:13:38 EST
On 2/23/26 03:59, Felix Gu wrote:
The driver uses devm_add_action_or_reset() to register sprd_wdt_disable()
as a managed cleanup action.
When devm_watchdog_register_device() fails, the devm core will invoke
the cleanup action automatically.
The explicit sprd_wdt_disable() call in the error path is therefore
redundant and results in adouble cleanup.
Fixes: 78d9bfad2e89 ("watchdog: sprd_wdt: Convert to use device managed functions and other improvements")
Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>