Re: [PATCH] pinctrl: nuvoton: Fix clock reference leak in ma35_get_bank_data()
From: Linus Walleij
Date: Wed Sep 30 2026 - 09:54:14 EST
On Thu, Sep 17, 2026 at 3:48 PM Wentao Liang <vulab@xxxxxxxxxxx> wrote:
> ma35_get_bank_data() obtains the bank clock with of_clk_get() and
> stores it in bank->clk, but returns clk_prepare_enable() directly. If
> that call fails, the reference taken by of_clk_get() is never dropped,
> and the driver has no other clk_put() for it.
>
> Drop the reference when clk_prepare_enable() fails.
>
> Fixes: f805e356313b ("pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
Patch applied. I dropped stable because it's not that serious.
Yours,
Linus Walleij