Skip to contentSkip to conversation

powerpc/powermac: fix OF node refcount leak

PATCH Applied Dmitry Torokhov 2 participants 2 messages Jan 31, 2017 – Dec 12, 2017

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

PATCH 1/1 powerpc/powermac: fix OF node refcount leak

We need to call of_node_put() for device nodes obtained with of_find_node_by_name().

---

Found by visual inspection, not tested...

 arch/powerpc/platforms/powermac/pic.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/platforms/powermac/pic.c +1 -0
index f5f9ad7c3398..d3a9ab0dbcb1 100644
@@ -604,6 +604,7 @@ static int pmacpic_find_viaint(void)
 	if (np == NULL)
 		goto not_found;
 	viaint = irq_of_parse_and_map(np, 0);
+	of_node_put(np);
 
 not_found:
 #endif /* CONFIG_ADB_PMU */
Signature · 5 lines
2.11.0.483.g087da7b7c-goog


-- 
Dmitry