Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: zx296702_dma: Use dma_pool_zalloc

We should use dma_pool_zalloc instead of dma_pool_alloc/memset.

Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Souptick Joarder and committed by
Vinod Koul
c2e60fc7 d6481608

+1 -2
+1 -2
drivers/dma/zx296702_dma.c
··· 435 435 if (!ds) 436 436 return NULL; 437 437 438 - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); 438 + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli); 439 439 if (!ds->desc_hw) { 440 440 dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc); 441 441 kfree(ds); 442 442 return NULL; 443 443 } 444 - memset(ds->desc_hw, 0, sizeof(struct zx_desc_hw) * num); 445 444 ds->desc_num = num; 446 445 return ds; 447 446 }