]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop
authorLiang He <windhl@126.com>
Tue, 19 Jul 2022 12:49:55 +0000 (20:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:09 +0000 (14:24 +0200)
commit3c6c8c2c827b107643aacc9316bcda8b7f657d60
tree91b92c3e15d98d0bb1122d753b22f876bd321581
parent4b7e57a53f1ddb78c953a46428b582742856b1b2
iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop

[ Upstream commit a68a31375a56a0be96d8a55e850787eafac1279f ]

In qcom_iommu_has_secure_context(), we should call of_node_put()
for the reference 'child' when breaking out of for_each_child_of_node()
which will automatically increase and decrease the refcount.

Fixes: 9bb530110d1c ("iommu/qcom: Initialize secure page table")
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220719124955.1242171-1-windhl@126.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/arm/arm-smmu/qcom_iommu.c