Re: [PATCH] watchdog: starfive-wdt: Fix runtime PM leak in starfive_wdt_pm_start()
From: Guenter Roeck
Date: Wed Sep 16 2026 - 20:46:35 EST
On Wed, Sep 16, 2026 at 05:07:04PM +0000, Wentao Liang wrote:
> starfive_wdt_pm_start() takes a runtime PM reference with
> pm_runtime_get_sync(), which increments the usage counter even when it
> fails, and returns the error without dropping it again. The watchdog
> core does not invoke the stop callback when start fails, so the
> reference taken on the error path is leaked.
>
> Use pm_runtime_resume_and_get() instead, which keeps the usage counter
> balanced when the resume fails.
>
> Fixes: db728ea9c7be ("drivers: watchdog: Add StarFive Watchdog driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Applied.
Thanks,
Guenter