From: Sean Paul Date: Wed, 1 Oct 2014 15:31:50 +0000 (+0100) Subject: arm64: Use DMA_ERROR_CODE to denote failed allocation X-Git-Tag: v3.18-rc1~136^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a52ce121918382a4249d621cceb07c30e1c00fa2;p=karo-tx-linux.git arm64: Use DMA_ERROR_CODE to denote failed allocation This patch replaces the static assignment of ~0 to dma_handle with DMA_ERROR_CODE to be consistent with other platforms. Signed-off-by: Sean Paul Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index d6ceb3df0047..2c71077cacfd 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -122,7 +122,7 @@ static void *__dma_alloc_noncoherent(struct device *dev, size_t size, no_map: __dma_free_coherent(dev, size, ptr, *dma_handle, attrs); no_mem: - *dma_handle = ~0; + *dma_handle = DMA_ERROR_CODE; return NULL; }