Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: Fix refcount leak in axxia_boot_secondary

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 1d22924e1c4e ("ARM: Add platform support for LSI AXM55xx SoC")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220601090548.47616-1-linmq006@gmail.com'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Miaoqian Lin and committed by
Arnd Bergmann
7c7ff68d 89931cb4

+1
+1
arch/arm/mach-axxia/platsmp.c
··· 39 39 return -ENOENT; 40 40 41 41 syscon = of_iomap(syscon_np, 0); 42 + of_node_put(syscon_np); 42 43 if (!syscon) 43 44 return -ENOMEM; 44 45