mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
12154c8737
commit
646b3b569e
1 changed files with 1 additions and 2 deletions
|
@ -458,13 +458,12 @@ static struct k3_dma_desc_sw *k3_dma_alloc_desc_resource(int num,
|
||||||
if (!ds)
|
if (!ds)
|
||||||
return NULL;
|
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) {
|
if (!ds->desc_hw) {
|
||||||
dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
|
dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
|
||||||
kfree(ds);
|
kfree(ds);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memset(ds->desc_hw, 0, sizeof(struct k3_desc_hw) * num);
|
|
||||||
ds->desc_num = num;
|
ds->desc_num = num;
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue