Re: [PATCH] spmi: mtk-pmif: Fix clock reference leak in mtk_spmi_bus_probe()
From: Abel Vesa
Date: Mon Sep 21 2026 - 07:53:32 EST
On 26-09-17 15:50:37, Wentao Liang wrote:
> of_clk_get_by_name() returns a reference that must be released with
> clk_put(). If the lookup of a later clock fails, the function returns
> without releasing the clocks that were already obtained. Put those
> clocks before returning.
>
> Fixes: 078117963b2c ("spmi: mtk-pmif: Add multi-bus support for SPMI 2.0")
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxxxxxxxx>