aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-02-28 10:37:10 -0500
committerWill Deacon <will.deacon@arm.com>2014-04-15 07:19:33 -0400
commit16c50dcfc4c186ed09a4d80fbd511492d024a1c5 (patch)
treea3a7fb799c35082d7105e71a4d189ae63a4caa47
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
iommu/arm-smmu: Return 0 on unmap failure
The IOMMU core expects the unmap operation to return the number of bytes that have been unmapped or 0 on failure, a negative return value being treated like a number of bytes. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--drivers/iommu/arm-smmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8b89e33a89fe..69d001a71b22 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1499,7 +1499,7 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
1499 1499
1500 ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0); 1500 ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0);
1501 arm_smmu_tlb_inv_context(&smmu_domain->root_cfg); 1501 arm_smmu_tlb_inv_context(&smmu_domain->root_cfg);
1502 return ret ? ret : size; 1502 return ret ? 0 : size;
1503} 1503}
1504 1504
1505static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain, 1505static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,