Skip to contentSkip to conversation

powerpc/fsl_pci: Remove of_node_put() when reference escaped out

PATCH Applied Liang He 2 participants 2 messages Jul 20, 2022 – Sep 9, 2022 PowerPC

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 powerpc/fsl_pci: Remove of_node_put() when reference escaped out

In fsl_pci_assign_primary(), we should remove the of_node_put() when breaking out of the for_each_matching_node() as the 'np' is escaped out by global 'fsl_pci_primary'.

Fixes 905e75c46dba ("powerpc/fsl-pci: Unify pci/pcie initialization code")
---
 arch/powerpc/sysdev/fsl_pci.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/sysdev/fsl_pci.c +0 -1
index e8d072e98b66..aa7faa19c6ef 100644
@@ -1134,7 +1134,6 @@ void __init fsl_pci_assign_primary(void)
 	for_each_matching_node(np, pci_ids) {
 		if (of_device_is_available(np)) {
 			fsl_pci_primary = np;
-			of_node_put(np);
 			return;
 		}
 	}
Signature · 1 line
2.25.1