ASoC: q6asm: use kcalloc() instead of kzalloc()

Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().

Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20211006180810.GA913370@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Gustavo A. R. Silva 2021-10-06 13:08:10 -05:00 committed by Mark Brown
parent b01156128f
commit 40d060b815
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -513,7 +513,7 @@ int q6asm_map_memory_regions(unsigned int dir, struct audio_client *ac,
return 0; return 0;
} }
buf = kzalloc(((sizeof(struct audio_buffer)) * periods), GFP_ATOMIC); buf = kcalloc(periods, sizeof(*buf), GFP_ATOMIC);
if (!buf) { if (!buf) {
spin_unlock_irqrestore(&ac->lock, flags); spin_unlock_irqrestore(&ac->lock, flags);
return -ENOMEM; return -ENOMEM;