[PATCH] pinctrl: nuvoton: Fix clock reference leak in ma35_get_bank_data()
Linus Walleij
linusw at kernel.org
Wed Sep 30 06:16:30 PDT 2026
On Thu, Sep 17, 2026 at 3:48 PM Wentao Liang <vulab at iscas.ac.cn> 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 at vger.kernel.org
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
Patch applied. I dropped stable because it's not that serious.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list