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;
|
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;
|
||||||
|
|
Loading…
Reference in New Issue