aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/mm/iommu.c
diff options
context:
space:
mode:
authorMartin Oliveira <[email protected]>2021-07-29 14:15:32 -0600
committerChristoph Hellwig <[email protected]>2021-08-09 17:13:06 +0200
commite02373fddb0ea86ce3962bb5d38e20ea0b6c8a05 (patch)
treeb23334f08013221ea318befc3146d15e673d56fb /arch/sparc/mm/iommu.c
parent7e4e7d4c54ecc9986041aae84e04280413f2435b (diff)
sparc/iommu: return error codes from .map_sg() ops
The .map_sg() op now expects an error code instead of zero on failure. Returning an errno from __sbus_iommu_map_sg() results in sbus_iommu_map_sg_gflush() and sbus_iommu_map_sg_pflush() returning an errno, as those functions are wrappers around __sbus_iommu_map_sg(). Signed-off-by: Martin Oliveira <[email protected]> Signed-off-by: Logan Gunthorpe <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Niklas Schnelle <[email protected]> Cc: Michael Ellerman <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'arch/sparc/mm/iommu.c')
-rw-r--r--arch/sparc/mm/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 0c0342e5b10d..9e3f6933ca13 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -256,7 +256,7 @@ static int __sbus_iommu_map_sg(struct device *dev, struct scatterlist *sgl,
sg->dma_address =__sbus_iommu_map_page(dev, sg_page(sg),
sg->offset, sg->length, per_page_flush);
if (sg->dma_address == DMA_MAPPING_ERROR)
- return 0;
+ return -EIO;
sg->dma_length = sg->length;
}