[PATCH] cache: ax45mp: Fix device node reference leak in ax45mp_cache_init()

Conor Dooley conor at kernel.org
Fri Feb 6 12:28:45 PST 2026


From: Conor Dooley <conor.dooley at 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.



More information about the linux-riscv mailing list