Skip to content

Commit 40d060b

Browse files
GustavoARSilvabroonie
authored andcommitted
ASoC: q6asm: use kcalloc() instead of kzalloc()
Use 2-factor multiplication argument form kcalloc() instead of kzalloc(). Link: KSPP#162 Signed-off-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/20211006180810.GA913370@embeddedor Signed-off-by: Mark Brown <[email protected]>
1 parent b011561 commit 40d060b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/qcom/qdsp6/q6asm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ int q6asm_map_memory_regions(unsigned int dir, struct audio_client *ac,
513513
return 0;
514514
}
515515

516-
buf = kzalloc(((sizeof(struct audio_buffer)) * periods), GFP_ATOMIC);
516+
buf = kcalloc(periods, sizeof(*buf), GFP_ATOMIC);
517517
if (!buf) {
518518
spin_unlock_irqrestore(&ac->lock, flags);
519519
return -ENOMEM;

0 commit comments

Comments
 (0)