diff options
author | Martin Oliveira <martin.oliveira@eideticom.com> | 2021-07-29 23:15:34 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-08-09 18:13:06 +0300 |
commit | 9a22f2f3435184df2882b8c6d6999e6ef022331b (patch) | |
tree | 6353486bd8144a7bfe02820e5ce3b1db73f606f9 | |
parent | ba3a0482db879f33863348b81ed9770888d727a9 (diff) | |
download | linux-9a22f2f3435184df2882b8c6d6999e6ef022331b.tar.xz |
parisc: return error code from .map_sg() ops
The .map_sg() op now expects an error code instead of zero on failure.
Return -EINVAL if the ioc cannot be obtained.
Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/parisc/ccio-dma.c | 2 | ||||
-rw-r--r-- | drivers/parisc/sba_iommu.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index b5f9ee81a46c..452e72b7bd01 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -918,7 +918,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, BUG_ON(!dev); ioc = GET_IOC(dev); if (!ioc) - return 0; + return -EINVAL; DBG_RUN_SG("%s() START %d entries\n", __func__, nents); diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index dce4cdf786cd..e60690d38d67 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c @@ -947,7 +947,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, ioc = GET_IOC(dev); if (!ioc) - return 0; + return -EINVAL; /* Fast path single entry scatterlists. */ if (nents == 1) { |