* Re: [PATCH] cache: ax45mp: Fix device node reference leak in ax45mp_cache_init()
[not found] <20260131-ax45mp-v1-1-a566905c5c8a@gmail.com>
@ 2026-02-06 20:28 ` Conor Dooley
0 siblings, 0 replies; only message in thread
From: Conor Dooley @ 2026-02-06 20:28 UTC (permalink / raw)
To: linux-riscv, Conor Dooley, Jonathan Cameron, Lad Prabhakar,
Palmer Dabbelt, Felix Gu
Cc: Conor Dooley, Daire McNamara, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
From: Conor Dooley <conor.dooley@microchip.com>
On Sat, 31 Jan 2026 01:49:09 +0800, Felix Gu wrote:
> In ax45mp_cache_init(), of_find_matching_node() returns a device node
> with an incremented reference count that must be released with
> of_node_put(). The current code fails to call of_node_put() which
> causes a reference leak.
>
> Use the __free(device_node) attribute to ensure automatic cleanup when
> the variable goes out of scope.
>
> [...]
Applied to riscv-soc-fixes, thanks!
[1/1] cache: ax45mp: Fix device node reference leak in ax45mp_cache_init()
https://git.kernel.org/conor/c/0528a348b04b
Thanks,
Conor.
^ permalink raw reply [flat|nested] only message in thread