Re: [PATCH] mtd: rawnand: pl353: fix clk reference leak in pl35x_nfc_setup_interface()

From: Miquel Raynal

Date: Mon Oct 12 2026 - 14:22:59 EST


On Fri, 09 Oct 2026 14:06:10 +0800, Haotian Zhang wrote:
> pl35x_nfc_setup_interface() obtains a reference to the SMC "memclk" with
> of_clk_get_by_name() and only uses it to read the clock rate. The
> reference is never released: the function has many early return paths
> and no clk_put() call anywhere, so the clock reference is leaked.
>
> The hook is invoked repeatedly by the NAND core (nand_reset(),
> nand_setup_interface() and the NAND_DATA_IFACE_CHECK_ONLY mode probing
> loops), so the reference count keeps growing.
>
> [...]

Applied to nand/next, thanks!

[1/1] mtd: rawnand: pl353: fix clk reference leak in pl35x_nfc_setup_interface()
commit: 1ce45f0e74d60e8279ed380c97047e6c351aee1b

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl