* [PATCH] powerpc: embedded6xx: Fix refcount leak bug in holly.c
@ 2022-06-18 3:52 Liang He
0 siblings, 0 replies; only message in thread
From: Liang He @ 2022-06-18 3:52 UTC (permalink / raw)
To: mpe, benh, paulus, christophe.leroy, nick.child, npiggin
Cc: windhl, linuxppc-dev, linux-kernel
In holly_init_pci(), of_find_node_by_type() 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/powerpc/platforms/embedded6xx/holly.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 78f2378d9223..a4938505e89a 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -122,6 +122,7 @@ static void __init holly_init_pci(void)
np = of_find_node_by_type(NULL, "pci");
if (np)
tsi108_setup_pci(np, HOLLY_PCI_CFG_PHYS, 1);
+ of_node_put(np);
ppc_md.pci_exclude_device = holly_exclude_device;
if (ppc_md.progress)
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-18 3:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-18 3:52 [PATCH] powerpc: embedded6xx: Fix refcount leak bug in holly.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®