ARM: 9218/1: dma-mapping: fix pointer/integer warning
authorBen Dooks <ben-linux@fluff.org>
Sun, 24 Jul 2022 22:39:21 +0000 (23:39 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 28 Jul 2022 14:09:16 +0000 (15:09 +0100)
Fix the use of a pointer assignment from integer where false
is being used instead of NULL. Fix the following warning by
usign NULL:

arch/arm/mm/dma-mapping.c:712:52: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/mm/dma-mapping.c

index 059cce0185706871c702b3f95a5df71444ff24ed..1483b6a4319dba58f901b6d7f4ed9f6c3a0ad614 100644 (file)
@@ -709,7 +709,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
 
        *handle = DMA_MAPPING_ERROR;
        allowblock = gfpflags_allow_blocking(gfp);
-       cma = allowblock ? dev_get_cma_area(dev) : false;
+       cma = allowblock ? dev_get_cma_area(dev) : NULL;
 
        if (cma)
                buf->allocator = &cma_allocator;