powerpc/iommu: Add missing of_node_put in iommu_init_early_dart
authorPeng Wu <wupeng58@huawei.com>
Mon, 25 Apr 2022 08:12:45 +0000 (08:12 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:43 +0000 (10:22 +0200)
commitdf6d8b689252c0acc0448d4ae3d33f2d6db048ab
treea2254dff92ff20333032acf74f9bc41ba82bc2c3
parent787255e6190a9bc171dbab642344dfb37b0e5ad8
powerpc/iommu: Add missing of_node_put in iommu_init_early_dart

[ Upstream commit 57b742a5b8945118022973e6416b71351df512fb ]

The device_node pointer is returned by of_find_compatible_node
with refcount incremented. We should use of_node_put() to avoid
the refcount leak.

Signed-off-by: Peng Wu <wupeng58@huawei.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220425081245.21705-1-wupeng58@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/sysdev/dart_iommu.c