diff options
author | Vinod Koul <vinod.koul@intel.com> | 2015-09-21 11:26:58 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-09-21 11:26:58 -0400 |
commit | 9c811209eb87f26e83f1b1afea186d4797f8b71e (patch) | |
tree | 99f96930da46326ed05e571561b2f9705229afe0 /drivers/dma/xgene-dma.c | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
dmaengine: xgene-dma: use dma_pool_zalloc
We should use shiny new dma_pool_zalloc instead of
dma_pool_alloc/memset
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/xgene-dma.c')
-rw-r--r-- | drivers/dma/xgene-dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c index b23e8d52d126..dc84ed1f7541 100644 --- a/drivers/dma/xgene-dma.c +++ b/drivers/dma/xgene-dma.c | |||
@@ -556,14 +556,12 @@ static struct xgene_dma_desc_sw *xgene_dma_alloc_descriptor( | |||
556 | struct xgene_dma_desc_sw *desc; | 556 | struct xgene_dma_desc_sw *desc; |
557 | dma_addr_t phys; | 557 | dma_addr_t phys; |
558 | 558 | ||
559 | desc = dma_pool_alloc(chan->desc_pool, GFP_NOWAIT, &phys); | 559 | desc = dma_pool_zalloc(chan->desc_pool, GFP_NOWAIT, &phys); |
560 | if (!desc) { | 560 | if (!desc) { |
561 | chan_err(chan, "Failed to allocate LDs\n"); | 561 | chan_err(chan, "Failed to allocate LDs\n"); |
562 | return NULL; | 562 | return NULL; |
563 | } | 563 | } |
564 | 564 | ||
565 | memset(desc, 0, sizeof(*desc)); | ||
566 | |||
567 | INIT_LIST_HEAD(&desc->tx_list); | 565 | INIT_LIST_HEAD(&desc->tx_list); |
568 | desc->tx.phys = phys; | 566 | desc->tx.phys = phys; |
569 | desc->tx.tx_submit = xgene_dma_tx_submit; | 567 | desc->tx.tx_submit = xgene_dma_tx_submit; |