]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/dma: return error code from iommu_dma_map_sg()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 29 Jul 2021 20:15:22 +0000 (14:15 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:13:05 +0000 (17:13 +0200)
commit97c83c39a030608c51b16ed3600f59debaf80a28
treef4dea5b7c8bf224c94de32dba2c61bc4e0267ac3
parent659d4f0c81a83393cb34882f61704dac259a5338
iommu/dma: return error code from iommu_dma_map_sg()

Return appropriate error codes EINVAL or ENOMEM from
iommup_dma_map_sg(). If lower level code returns ENOMEM, then we
return it, other errors are coalesced into EINVAL.

iommu_dma_map_sg_swiotlb() returns -EIO as its an unknown error
from a call that returns DMA_MAPPING_ERROR.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/iommu/dma-iommu.c