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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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) {