diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-10-06 20:08:10 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-28 12:59:10 +0200 |
commit | 40d060b8158e26438398bf1132925f666e3b6480 (patch) | |
tree | b19d4ecf5beefb065692c201b773dce1ec3c7a94 | |
parent | ASoC: atmel: one fix and one cleanup (diff) | |
download | linux-40d060b8158e26438398bf1132925f666e3b6480.tar.xz linux-40d060b8158e26438398bf1132925f666e3b6480.zip |
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>
-rw-r--r-- | sound/soc/qcom/qdsp6/q6asm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 9251d8548965..195780f75d05 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -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; |