dmaengine: at_hdmac: Substitute kzalloc with kmalloc
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 23 Jan 2020 14:03:02 +0000 (14:03 +0000)
committerVinod Koul <vkoul@kernel.org>
Tue, 25 Feb 2020 05:57:27 +0000 (11:27 +0530)
All members of the structure are initialized below in the function,
there is no need to use kzalloc.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Link: https://lore.kernel.org/r/20200123140237.125799-1-tudor.ambarus@microchip.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/at_hdmac.c

index 672c73b..cad6dcd 100644 (file)
@@ -1671,7 +1671,7 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
        dma_cap_zero(mask);
        dma_cap_set(DMA_SLAVE, mask);
 
-       atslave = kzalloc(sizeof(*atslave), GFP_KERNEL);
+       atslave = kmalloc(sizeof(*atslave), GFP_KERNEL);
        if (!atslave)
                return NULL;