aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorLiang He <windhl@126.com>2022-07-20 20:45:57 +0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-05 17:30:29 +1000
commitafa6a472a3d2a8dd477b285eeb67b3593546647b (patch)
tree66e37b6be6ad85d65487a2f4bd927d498a1488ac /arch/powerpc/sysdev
parentpowerpc/85xx: Add missing of_node_get/put() in ge_imp3a_pci_assign_primary() (diff)
downloadlinux-dev-afa6a472a3d2a8dd477b285eeb67b3593546647b.tar.xz
linux-dev-afa6a472a3d2a8dd477b285eeb67b3593546647b.zip
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'. Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220720124557.1256243-1-windhl@126.com
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 4c3fd9f4cc7b..1ef7400ef244 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1146,7 +1146,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;
}
}