Thread (14 messages) read the whole thread 14 messages, 2 authors, 2016-02-26
STALE3810d

[PATCH 3/9] ARM: uniphier: add missing of_node_put()

From: Masahiro Yamada <hidden>
Date: 2016-02-16 02:18:39
Also in: lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

This node pointer is allocated by of_find_compatible_node() in this
function.  It should be put before exitting this function.

Signed-off-by: Masahiro Yamada <redacted>
---

 arch/arm/mach-uniphier/platsmp.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-uniphier/platsmp.c b/arch/arm/mach-uniphier/platsmp.c
index b53a8d9..fad568d 100644
--- a/arch/arm/mach-uniphier/platsmp.c
+++ b/arch/arm/mach-uniphier/platsmp.c
@@ -100,6 +100,7 @@ static int __init uniphier_smp_prepare_trampoline(unsigned int max_cpus)
 
 	np = of_find_compatible_node(NULL, NULL, "socionext,uniphier-smpctrl");
 	ret = of_address_to_resource(np, 0, &res);
+	of_node_put(np);
 	if (ret) {
 		pr_err("failed to get resource of uniphier-smpctrl\n");
 		return ret;
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help