aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mic_x100_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/mic_x100_dma.c')
-rw-r--r--drivers/dma/mic_x100_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index 94d7bd7d2880..68dd79783b54 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -385,7 +385,8 @@ static int mic_dma_alloc_desc_ring(struct mic_dma_chan *ch)
if (dma_mapping_error(dev, ch->desc_ring_micpa))
goto map_error;
- ch->tx_array = vzalloc(MIC_DMA_DESC_RX_SIZE * sizeof(*ch->tx_array));
+ ch->tx_array = vzalloc(array_size(MIC_DMA_DESC_RX_SIZE,
+ sizeof(*ch->tx_array)));
if (!ch->tx_array)
goto tx_error;
return 0;