Re: [PATCH] memory: emif: fix device_node reference leak on np_ddr
From: Krzysztof Kozlowski
Date: Tue Sep 15 2026 - 03:10:57 EST
On Wed, 09 Sep 2026 19:26:26 -0400, Miles Krause wrote:
> of_get_memory_device_details() takes a reference on the DDR device
> node via of_parse_phandle() and stores it in emif->np_ddr for later
> use, but drops that reference without calling of_node_put() on two
> error paths: the devm_kzalloc() allocation-failure check and the
> is_dev_data_valid() check. Both return NULL immediately, leaking the
> node reference each time either failure triggers.
>
> [...]
Applied, thanks!
[1/1] memory: emif: fix device_node reference leak on np_ddr
https://git.kernel.org/krzk/linux-mem-ctrl/c/314ef67d673284d4c070455bd62d332f6d0f8634
Best regards,
--
Krzysztof Kozlowski <krzk@xxxxxxxxxx>