Skip to contentSkip to conversation

ARM: tegra: Fix refcount leak in tegra114_gic_cpu_pm_registration

PATCH New Miaoqian Lin 1 participant 1 message May 23, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: Fix refcount leak in tegra114_gic_cpu_pm_registration

of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.

Fixes 7e8b15dbc392 ("ARM: tegra114: Reprogram GIC CPU interface to bypass IRQ on CPU PM entry")
---
 arch/arm/mach-tegra/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-tegra/irq.c +1 -1
index 4e1ee70b2a3f..d51bdd46219e 100644
@@ -73,7 +73,7 @@ static void __init tegra114_gic_cpu_pm_registration(void)
 		return;
 
 	tegra_gic_cpu_base = of_iomap(dn, 1);
-
+	of_node_put(dn);
 	cpu_pm_register_notifier(&tegra_gic_notifier_block);
 }
 #else
Signature · 1 line
2.25.1