summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2015-10-14 14:42:55 +0300
committerVinod Koul <vinod.koul@intel.com>2015-10-14 19:57:12 +0530
commit547c6e27113b7d0d03db6df0d60f91b8eb232793 (patch)
tree8b561a14def2892531222be8bdb0c521e6bf2967 /drivers/dma
parentcb78205955d4a2c26c18984896b81cc63b416f63 (diff)
dmaengine: edma: Use devm_kcalloc when possible
When allocating a memory for number of items it is better (looks better) to use devm_kcalloc. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/edma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index d5a76c67f83f..95c10373168d 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -2055,7 +2055,7 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
* priority. So Q0 is the highest priority queue and the last queue has
* the lowest priority.
*/
- queue_priority_map = devm_kzalloc(dev, (ecc->num_tc + 1) * sizeof(s8),
+ queue_priority_map = devm_kcalloc(dev, ecc->num_tc + 1, sizeof(s8),
GFP_KERNEL);
if (!queue_priority_map)
return -ENOMEM;
@@ -2086,7 +2086,7 @@ static int edma_xbar_event_map(struct device *dev, struct edma_soc_info *pdata,
u32 shift, offset, mux;
int ret, i;
- xbar_chans = devm_kzalloc(dev, (nelm + 2) * sizeof(s16), GFP_KERNEL);
+ xbar_chans = devm_kcalloc(dev, nelm + 2, sizeof(s16), GFP_KERNEL);
if (!xbar_chans)
return -ENOMEM;