From: Vinod Koul Date: Wed, 7 Dec 2016 04:06:22 +0000 (+0530) Subject: dmaengine: k3dma: move to dma_pool_zalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=646b3b569e9ac54436b93bd91e0c0e111178bec0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dmaengine: k3dma: move to dma_pool_zalloc Replace dma_pool_alloc & memset with dma_pool_zalloc. Acked-by: Zhangfei Gao Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index aabcb7934b05..01e25c68dd5a 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -458,13 +458,12 @@ static struct k3_dma_desc_sw *k3_dma_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 k3_desc_hw) * num); ds->desc_num = num; return ds; }