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

Commit c2e60fc7 authored by Souptick Joarder's avatar Souptick Joarder Committed by Vinod Koul
Browse files

dmaengine: zx296702_dma: Use dma_pool_zalloc



We should use dma_pool_zalloc instead of dma_pool_alloc/memset.

Signed-off-by: default avatarSouptick joarder <jrdr.linux@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent d6481608
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}