Skip to content

Commit

Permalink
s390/dma: fix mapping_error detection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Jun 19, 2013
1 parent 690cec8 commit 73e5a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 73e5a84

Please sign in to comment.