Re: [PATCH] mtd: nand: ecc: release OF node reference when platform device is not ready

From: Miquel Raynal

Date: Fri Dec 04 2026 - 16:34:54 EST


On Fri, 04 Dec 2026 17:10:47 +0800, Ziheng Wei wrote:
> In nand_ecc_get_on_host_hw_engine(), of_parse_phandle() acquires a
> reference on the nand-ecc-engine device_node. If of_find_device_by_node()
> returns NULL, the function returns ERR_PTR(-EPROBE_DEFER) without calling
> of_node_put(np), leaking a device_node reference on every deferred probe.
>
> Call of_node_put(np) right after of_find_device_by_node(np).
>
> [...]

Applied to nand/next, thanks!

[1/1] mtd: nand: ecc: release OF node reference when platform device is not ready
commit: dab547f4666f6649360053a95104b8c4480f46a8

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