Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c811209 authored by Vinod Koul's avatar Vinod Koul
Browse files

dmaengine: xgene-dma: use dma_pool_zalloc



We should use shiny new dma_pool_zalloc instead of
dma_pool_alloc/memset

Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 6ff33f39
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -556,14 +556,12 @@ static struct xgene_dma_desc_sw *xgene_dma_alloc_descriptor(
	struct xgene_dma_desc_sw *desc;
	struct xgene_dma_desc_sw *desc;
	dma_addr_t phys;
	dma_addr_t phys;


	desc = dma_pool_alloc(chan->desc_pool, GFP_NOWAIT, &phys);
	desc = dma_pool_zalloc(chan->desc_pool, GFP_NOWAIT, &phys);
	if (!desc) {
	if (!desc) {
		chan_err(chan, "Failed to allocate LDs\n");
		chan_err(chan, "Failed to allocate LDs\n");
		return NULL;
		return NULL;
	}
	}


	memset(desc, 0, sizeof(*desc));

	INIT_LIST_HEAD(&desc->tx_list);
	INIT_LIST_HEAD(&desc->tx_list);
	desc->tx.phys = phys;
	desc->tx.phys = phys;
	desc->tx.tx_submit = xgene_dma_tx_submit;
	desc->tx.tx_submit = xgene_dma_tx_submit;