From: Souptick Joarder Date: Tue, 29 Nov 2016 20:58:58 +0000 (+0530) Subject: dmaengine: zx296702_dma: Use dma_pool_zalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2e60fc702db68029e32c1fe00a9683dcb29316b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dmaengine: zx296702_dma: Use dma_pool_zalloc We should use dma_pool_zalloc instead of dma_pool_alloc/memset. Signed-off-by: Souptick joarder Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c index 245d759d5ffc..380276d078b2 100644 --- a/drivers/dma/zx296702_dma.c +++ b/drivers/dma/zx296702_dma.c @@ -435,13 +435,12 @@ static struct zx_dma_desc_sw *zx_alloc_desc_resource(int num, if (!ds) return NULL; - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); if (!ds->desc_hw) { dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc); kfree(ds); return NULL; } - memset(ds->desc_hw, 0, sizeof(struct zx_desc_hw) * num); ds->desc_num = num; return ds; }