powerpc/pci_dn: Add missing of_node_put()
authorLiang He <windhl@126.com>
Fri, 1 Jul 2022 13:17:50 +0000 (21:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:17:07 +0000 (13:17 +0200)
commit5d98d7325a0ce7e5ca9f3855e0878d776eff7657
treeae30a58aab5917f34d066d68fe834861412d9ace
parent8b268956d71d903d2dccf0a5f31e77a9e4744d1a
powerpc/pci_dn: Add missing of_node_put()

[ Upstream commit 110a1fcb6c4d55144d8179983a475f17a1d6f832 ]

In pci_add_device_node_info(), use of_node_put() to drop the reference
to 'parent' returned by of_get_parent() to keep refcount balance.

Fixes: cca87d303c85 ("powerpc/pci: Refactor pci_dn")
Co-authored-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Link: https://lore.kernel.org/r/20220701131750.240170-1-windhl@126.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/pci_dn.c