mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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:
parent
b01156128f
commit
40d060b815
@ -513,7 +513,7 @@ int q6asm_map_memory_regions(unsigned int dir, struct audio_client *ac,
|
||||
return 0;
|
||||
}
|
||||
|
||||
buf = kzalloc(((sizeof(struct audio_buffer)) * periods), GFP_ATOMIC);
|
||||
buf = kcalloc(periods, sizeof(*buf), GFP_ATOMIC);
|
||||
if (!buf) {
|
||||
spin_unlock_irqrestore(&ac->lock, flags);
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user