Skip to content

Commit

Permalink
ARM: 9218/1: dma-mapping: fix pointer/integer warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks authored and Russell King (Oracle) committed Jul 28, 2022
1 parent b97abb4 commit 3437021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3437021

Please sign in to comment.