forked from Minki/linux
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>
This commit is contained in:
parent
ba3a0482db
commit
9a22f2f343
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user