Re: [PATCH] powerpc/fsl_pci: Remove of_node_put() when reference escaped out

2022-09-09 Thread Michael Ellerman
On Wed, 20 Jul 2022 20:45:57 +0800, Liang He wrote:
> 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'.
> 
> 

Applied to powerpc/next.

[1/1] powerpc/fsl_pci: Remove of_node_put() when reference escaped out
  https://git.kernel.org/powerpc/c/afa6a472a3d2a8dd477b285eeb67b3593546647b

cheers


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

2022-07-20 Thread Liang He
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")
Signed-off-by: Liang He 
---
 arch/powerpc/sysdev/fsl_pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index e8d072e98b66..aa7faa19c6ef 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -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;
}
}
-- 
2.25.1