Re: [PATCH] mtd: nand: ecc: release OF node reference when platform device is not ready
From: Miquel Raynal
Date: Fri Dec 04 2026 - 16:51:11 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 mtd/next, thanks!
[1/1] mtd: nand: ecc: release OF node reference when platform device is not ready
commit: 27d2c7bfe0667f439baffb9f057405df82c6819d
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