Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/dma: fix mapping_error detection

The map_page implementation of s390 returns DMA_ERROR_CODE in an error
situation. Correctly test if a mapping was erroneous (DMA_ERROR_CODE is
defined as ~0).

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
73e5a848 690cec8e

+1 -1
+1 -1
arch/s390/include/asm/dma-mapping.h
··· 52 53 if (dma_ops->mapping_error) 54 return dma_ops->mapping_error(dev, dma_addr); 55 - return (dma_addr == 0UL); 56 } 57 58 static inline void *dma_alloc_coherent(struct device *dev, size_t size,
··· 52 53 if (dma_ops->mapping_error) 54 return dma_ops->mapping_error(dev, dma_addr); 55 + return (dma_addr == DMA_ERROR_CODE); 56 } 57 58 static inline void *dma_alloc_coherent(struct device *dev, size_t size,