]> www.infradead.org Git - users/hch/misc.git/commitdiff
ASoC: Use kcalloc() instead of kzalloc()
authorMark Brown <broonie@kernel.org>
Wed, 20 Aug 2025 19:07:12 +0000 (20:07 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 20 Aug 2025 19:07:12 +0000 (20:07 +0100)
Merge series from Qianfeng Rong <rongqianfeng@vivo.com>:

Replace devm_kzalloc() with devm_kcalloc() in sound/soc.  As noted in the
kernel documentation [1], open-coded multiplication in allocator arguments
is discouraged because it can lead to integer overflow.

Using devm_kcalloc() provides built-in overflow protection, making the
memory allocation safer when calculating the allocation size compared
to explicit multiplication.

[1]: https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments


Trivial merge