Commit 9a22f2f3 authored by Martin Oliveira's avatar Martin Oliveira Committed by Christoph Hellwig

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: default avatarMartin Oliveira <martin.oliveira@eideticom.com>
Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent ba3a0482
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment