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
This commit is contained in:
parent
a8b89c10e6
commit
afa6a472a3
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue