Re: [PATCH v2] clk: imx: imx95-blk-ctl: Fix clock leak in error paths

From: Abel Vesa

Date: Wed Nov 12 2025 - 03:58:53 EST


On 25-11-12 10:30:25, Haotian Zhang wrote:
> The probe function enables bc->clk_apb early but fails to disable it
> when bc_data is NULL or clk_hw_data allocation fails. The cleanup
> path also misses pm_runtime_put_sync() when rpm is enabled.
>
> Switch to devm_clk_get_enabled() to automatically manage the clock
> resource. Add pm_runtime_put_sync() in cleanup path when rpm
> is enabled.
>
> Fixes: 5224b189462f ("clk: imx: add i.MX95 BLK CTL clk driver")
> Suggested-by: Peng Fan <peng.fan@xxxxxxx>
> Signed-off-by: Haotian Zhang <vulab@xxxxxxxxxxx>

Next time, please do not send the new version as a reply to the old one.

Everything else LGTM:

Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxx>