mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arch: mips: pic32: pic32mzda: Add missing of_node_put() in time.c
@ 2022-06-15 12:44 Liang He
  0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-15 12:44 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, windhl

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.

Signed-off-by: Liang He <windhl@126.com>
---
 arch/mips/pic32/pic32mzda/time.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/pic32/pic32mzda/time.c b/arch/mips/pic32/pic32mzda/time.c
index 7174e9abbb1b..c5b5343ca03c 100644
--- a/arch/mips/pic32/pic32mzda/time.c
+++ b/arch/mips/pic32/pic32mzda/time.c
@@ -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;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-15 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 12:44 [PATCH] arch: mips: pic32: pic32mzda: Add missing of_node_put() in time.c Liang He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®