Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 646b3b56 authored by Vinod Koul's avatar Vinod Koul
Browse files

dmaengine: k3dma: move to dma_pool_zalloc



Replace dma_pool_alloc & memset with dma_pool_zalloc.

Acked-by: default avatarZhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 12154c87
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}