Skip to contentSkip to conversation

powerpc: fsl: pci: Remove of_node_put() in fsl_pci_assign_primary()

PATCH New Liang He 1 participant 1 message Jul 5, 2022 PowerPC

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 powerpc: fsl: pci: Remove of_node_put() in fsl_pci_assign_primary()

for_each_matching_node() will automatically increase and decrease the refcount. As there is a reference escaped out into global 'fsl_pci_primary', we should not use of_node_put() anymore.

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 4c986c955951..d23a56276f42 100644
@@ -1137,7 +1137,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