ARM/dma-mapping: return error code from .map_sg() ops
authorMartin Oliveira <martin.oliveira@eideticom.com>
Thu, 29 Jul 2021 20:15:24 +0000 (14:15 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:13:05 +0000 (17:13 +0200)
commit6506932b3268001ff15c081aceb47c7f9aa9fb2d
treecedc362f507bd7a1732e910debc5244ccc768797
parentca33d26ac640bdf74e5fd0fcd711dbc5ab9f36c0
ARM/dma-mapping: return error code from .map_sg() ops

The .map_sg() op now expects an error code instead of zero on failure.
In the case of a DMA_MAPPING_ERROR, -EIO is returned. Otherwise,
-ENOMEM or -EINVAL is returned depending on the error from
__map_sg_chunk().

Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/arm/mm/dma-mapping.c