]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: test-component: Use kcalloc() instead of kzalloc()
authorQianfeng Rong <rongqianfeng@vivo.com>
Wed, 20 Aug 2025 12:34:20 +0000 (20:34 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 20 Aug 2025 14:09:24 +0000 (15:09 +0100)
commit96bcb34df55f7fee99795127c796315950c94fed
tree2524efa15e1fce9b2640b97eb9555889ecefcbbb
parent3b6f4bd6cda2797b0d999a129376c112d41604f4
ASoC: test-component: Use kcalloc() instead of kzalloc()

Use devm_kcalloc() in test_driver_probe() 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-4-rongqianfeng@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/test-component.c