[PATCH] pinctrl: stm32: Fix clock reference leak in stm32_pctl_probe()

Linus Walleij linusw at kernel.org
Wed Sep 30 06:17:33 PDT 2026


On Thu, Sep 17, 2026 at 3:50 PM Wentao Liang <vulab at iscas.ac.cn> wrote:

> stm32_pctl_probe() obtains one clock per bank with
> of_clk_get_by_name(), but none of the error paths drop those
> references: the loop returns directly when a later clock lookup fails,
> and both the clk_bulk_prepare_enable() failure and the err_register
> path return without calling clk_bulk_put().  clk_bulk_disable_unprepare()
> only disables the clocks, it does not release them.
>
> Release the references on these paths; the success path keeps them as
> the driver needs them for suspend/resume.
>
> Fixes: 451bc9aea9a1 ("pinctrl: stm32: Add check for clk_enable()")
> Cc: stable at vger.kernel.org
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>

Patch applied w/o stale tag.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list