Skip to contentSkip to conversation

arch: mips: pic32: pic32mzda: Add missing of_node_put() in time.c

PATCH New Liang He 1 participant 1 message Jun 15, 2022 MIPS

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 arch: mips: pic32: pic32mzda: Add missing of_node_put() in time.c

In pic32_xlate_core_timer_irq(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.

---
 arch/mips/pic32/pic32mzda/time.c | 3 +++
 1 file changed, 3 insertions(+)
arch/mips/pic32/pic32mzda/time.c +3 -0
index 7174e9abbb1b..c5b5343ca03c 100644
@@ -32,6 +32,9 @@ static unsigned int pic32_xlate_core_timer_irq(void)
 		goto default_map;
 
 	irq = irq_of_parse_and_map(node, 0);
+	
+	of_node_put(node);
+	
 	if (!irq)
 		goto default_map;
 
Signature · 1 line
2.25.1