]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: codecs: Use kcalloc() instead of kzalloc()
authorQianfeng Rong <rongqianfeng@vivo.com>
Wed, 20 Aug 2025 12:34:18 +0000 (20:34 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 20 Aug 2025 14:09:22 +0000 (15:09 +0100)
commit45441b933cdfb7a018674049f269d7a1bc1688df
treebdb7b1365ee1dbe7728f1f5e85f9de4fbe885a67
parent132e098ef9b60760ef9ef0c0eefc80c52cb498fb
ASoC: codecs: Use kcalloc() instead of kzalloc()

Use devm_kcalloc() in fs_parse_scene_tables() and pcmdev_gain_ctrl_add()
to gain built-in overflow protection, making memory allocation safer when
calculating allocation size compared to explicit multiplication.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://patch.msgid.link/20250820123423.470486-2-rongqianfeng@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/fs-amp-lib.c
sound/soc/codecs/pcm6240.c