ASoC: q6asm: use kcalloc() instead of kzalloc()
Subsystems (3)
PATCH 1/1 ASoC: q6asm: use kcalloc() instead of kzalloc()
Use 2-factor multiplication argument form kcalloc() instead of kzalloc().
--- sound/soc/qcom/qdsp6/q6asm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6asm.c +1 -1
@@ -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 ;
Signature · 1 line
2.27.0
Quoted 3 lines · Gustavo A. R. Silva
Use 2-factor multiplication argument form
kcalloc()instead ofkzalloc().
You probably need to elaborate why. E.g. refer to overflow.h and its idea behind.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Mark Brown
maintainerQuoted 4 lines · Gustavo A. R. Silva
Use 2-factor multiplication argument form
kcalloc()instead ofkzalloc().
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: q6asm: use kcalloc() instead of kzalloc()
commit: 40d060b8158e26438398bf1132925f666e3b6480
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark