projects/linux·commit 16c50dcf

iommu/arm-smmu: Return 0 on unmap failure

16c50dcf · Laurent Pinchart <[email protected]> · 2014-02-28 15:37:10 +00:00

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 <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Commit
16c50dcfc4c186ed09a4d80fbd511492d024a1c5
Parents
c9eaa447

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/iommu/arm-smmu.cmodified+1−1View file

drivers/iommu/arm-smmu.c

View file
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 8b89e33..69d001a 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,
ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0);
arm_smmu_tlb_inv_context(&smmu_domain->root_cfg);
- return ret ? ret : size;
+ return ret ? 0 : size;
}
static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,