]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
parisc: return error code from .map_sg() ops
authorMartin Oliveira <martin.oliveira@eideticom.com>
Thu, 29 Jul 2021 20:15:34 +0000 (14:15 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:13:06 +0000 (17:13 +0200)
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>
drivers/parisc/ccio-dma.c
drivers/parisc/sba_iommu.c

index b5f9ee81a46c1e2753d5f9150bf696279e882fff..452e72b7bd018a421e9d33a0b1c010d702ac2e0c 100644 (file)
@@ -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);
 
index dce4cdf786cdb19a607a79dc35a804067577d41d..e60690d38d677addfa91d0bf4575e88176691390 100644 (file)
@@ -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) {