Unverified Commit 40d060b8 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Mark Brown
Browse files

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: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20211006180810.GA913370@embeddedor


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b0115612
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;