diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index ea445d8fe7f3..08016ea62bee 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -3046,12 +3046,12 @@ static size_t arm_smmu_map_sg(struct iommu_domain *domain, unsigned long iova, out: arm_smmu_assign_table(smmu_domain); + arm_smmu_secure_domain_unlock(smmu_domain); if (size_to_unmap) { arm_smmu_unmap(domain, __saved_iova_start, size_to_unmap, NULL); iova = __saved_iova_start; } - arm_smmu_secure_domain_unlock(smmu_domain); return iova - __saved_iova_start; }