Skip to content

Commit

Permalink
ARM/dma-mapping: don't set failed sg dma_address to DMA_MAPPING_ERROR
Browse files Browse the repository at this point in the history
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/[email protected]/
Suggested-by: Christoph Hellwig <[email protected]>
Signed-off-by: Logan Gunthorpe <[email protected]>
Cc: Russell King <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
lsgunth authored and Christoph Hellwig committed Aug 9, 2021
1 parent 6506932 commit 9cf88ec
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9cf88ec

Please sign in to comment.