]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pasemi: Use of_root in pas_pci_init()
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 04:56:37 +0000 (14:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 6 Sep 2022 01:03:31 +0000 (11:03 +1000)
commit7401270b3fbb9443dd62d648543b9e51081508d9
treedfcebd1a3c0274d22c01c55c5cf44d2edf985091
parentd0254f42f4db0192052b57b481b09a6e1ea9b3ff
powerpc/pasemi: Use of_root in pas_pci_init()

Currently in pas_pci_init() a reference to the root node is leaked due
to a missing of_node_put(). Instead just use of_root directly.

Note that converting to of_find_compatible_node(NULL, ...) would
not be entirely equivalent, because that would check the compatible
property of the root node, whereas using of_root skips checking the root
node and start the search at the first child of the root.

Reported-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220906010313.1296714-1-mpe@ellerman.id.au
arch/powerpc/platforms/pasemi/pci.c