]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powermac/feature: Add missing of_node_put()
authorLiang He <windhl@126.com>
Sat, 16 Jul 2022 06:54:12 +0000 (14:54 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 5 Sep 2022 07:30:29 +0000 (17:30 +1000)
commitf30590be74798c3a043873a0f9c953e849a8b1e6
tree8723edc73e651730a820a8acb4969638b40362e3
parentbf86f4c16ce83495a4fe74fd4a898fce7dcb7be7
powerpc/powermac/feature: Add missing of_node_put()

In probe_one_macio(), call of_node_put() for the refernece 'node'
escaped out of the for_each_node_by_name() which has increased its
refcount. While the 'node' will finally escaped into a global reference,
we should still call of_node_put() in fail path which will stop global
reference creation.

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