Re: [PATCH] clk: starfive: jh7110-isp: fix pm_runtime error handling

From: Brian Masney

Date: Tue Sep 29 2026 - 13:12:50 EST


Hi bui,

On 2026-09-18 12:00 +0700, phucduc.bui@xxxxxxxxx wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> pm_runtime_get_sync() leaves the runtime PM usage counter incremented even
> when it fails, but the error path in jh7110_ispcrg_probe() does not call
> pm_runtime_put_noidle() to balance it, leaking a reference each time
> resume fails.
>
> Use pm_runtime_resume_and_get() instead, which automatically drops the
> usage counter on failure, fixing the leak.
>
> Also disable runtime PM before returning from the error path to balance
> the pm_runtime_enable() call.
>
> Fixes: 81279f5d0812 ("clk: starfive: Add StarFive JH7110 Image-Signal-Process clock driver")
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>

There's a separate fix for this that I applied earlier today.

Brian