Skip to content

Commit 16c50dc

Browse files
Laurent Pinchartwildea01
authored andcommitted
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 <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent c9eaa44 commit 16c50dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm-smmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ static size_t arm_smmu_unmap(struct iommu_domain *domain, unsigned long iova,
14991499

15001500
ret = arm_smmu_handle_mapping(smmu_domain, iova, 0, size, 0);
15011501
arm_smmu_tlb_inv_context(&smmu_domain->root_cfg);
1502-
return ret ? ret : size;
1502+
return ret ? 0 : size;
15031503
}
15041504

15051505
static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain,

0 commit comments

Comments
 (0)