Skip to content

Commit 7c7ff68

Browse files
Yuuoniyarndb
authored andcommitted
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: 1d22924 ("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>
1 parent 89931cb commit 7c7ff68

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

arch/arm/mach-axxia/platsmp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
3939
return -ENOENT;
4040

4141
syscon = of_iomap(syscon_np, 0);
42+
of_node_put(syscon_np);
4243
if (!syscon)
4344
return -ENOMEM;
4445

0 commit comments

Comments
 (0)