summaryrefslogtreecommitdiff
path: root/drivers/dma/k3dma.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-12-07 07:06:22 +0300
committerVinod Koul <vinod.koul@intel.com>2016-12-08 18:54:21 +0300
commit646b3b569e9ac54436b93bd91e0c0e111178bec0 (patch)
tree577c73b5537bc46a24bb9922beb862e663d6d1d5 /drivers/dma/k3dma.c
parent12154c87374c90b3b6bc169e1162aa4a27e91a63 (diff)
downloadlinux-646b3b569e9ac54436b93bd91e0c0e111178bec0.tar.xz
dmaengine: k3dma: move to dma_pool_zalloc
Replace dma_pool_alloc & memset with dma_pool_zalloc. Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/k3dma.c')
-rw-r--r--drivers/dma/k3dma.c3
1 files changed, 1 insertions, 2 deletions
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;
}