From: Logan Gunthorpe Date: Thu, 29 Jul 2021 20:15:25 +0000 (-0600) Subject: ARM/dma-mapping: don't set failed sg dma_address to DMA_MAPPING_ERROR X-Git-Tag: v5.15-rc1~124^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9cf88ec5e0e876c959389b1e695438f98663b92d;p=thirdparty%2Fkernel%2Flinux.git ARM/dma-mapping: don't set failed sg dma_address to DMA_MAPPING_ERROR Setting the ->dma_address to DMA_MAPPING_ERROR is not part of the ->map_sg calling convention, so remove it. Link: https://lore.kernel.org/linux-mips/20210716063241.GC13345@lst.de/ Suggested-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Cc: Russell King Cc: Thomas Bogendoerfer Signed-off-by: Christoph Hellwig --- diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 113b9cb3701bb..4b61541853ea1 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -1632,7 +1632,6 @@ static int __iommu_map_sg(struct device *dev, struct scatterlist *sg, int nents, for (i = 1; i < nents; i++) { s = sg_next(s); - s->dma_address = DMA_MAPPING_ERROR; s->dma_length = 0; if (s->offset || (size & ~PAGE_MASK) || size + s->length > max) {