]> 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>
Thu, 25 Aug 2022 09:18:04 +0000 (11:18 +0200)
commitcdd77ea461daa26780400d4915ca62b6e926c254
tree8ba766e51ec54765247f1e4f4902e1007a7bbc7e
parentd3d5e798e5c749065809c0dce5c2d0f4c976ef25
iommu/arm-smmu: qcom_iommu: Add of_node_put() when breaking out of loop

[ Upstream commit 59403de6d2221c953ae3a832471de91feefc57c0 ]

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: e8baa7bab808 ("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/qcom_iommu.c