diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-18 17:32:26 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-19 09:25:42 +0200 |
commit | 73e5a848426fae8e7f1f685389aa61d7a98e7c36 (patch) | |
tree | cfd900078f9b66a5b53d97d64243065ae0b1aef9 /arch/s390/include | |
parent | 690cec8e70c211d1f5f6e520b21a68d0306173b6 (diff) | |
download | op-kernel-dev-73e5a848426fae8e7f1f685389aa61d7a98e7c36.zip op-kernel-dev-73e5a848426fae8e7f1f685389aa61d7a98e7c36.tar.gz |
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>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/dma-mapping.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/dma-mapping.h b/arch/s390/include/asm/dma-mapping.h index 886ac7d..9f15a36 100644 --- a/arch/s390/include/asm/dma-mapping.h +++ b/arch/s390/include/asm/dma-mapping.h @@ -52,7 +52,7 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) if (dma_ops->mapping_error) return dma_ops->mapping_error(dev, dma_addr); - return (dma_addr == 0UL); + return (dma_addr == DMA_ERROR_CODE); } static inline void *dma_alloc_coherent(struct device *dev, size_t size, |