From af5b2e70c43f0dffbbabbcdb179624c5497eb5e4 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 20 May 2019 11:33:25 -0700 Subject: ARM: include: dma: Zero out DMA coherent memory in no-MMU case Add code to match the behavior of dma_alloc_coherent() when CONFIG_MMU is selected. Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- arch/arm/include/asm/dma.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index bb7e62af03..15999a524d 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h @@ -20,6 +20,8 @@ static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle) if (dma_handle) *dma_handle = (dma_addr_t)ret; + memset(ret, 0, size); + return ret; } -- cgit v1.2.3