[PATCH 0/4] pinctrl: use kcalloc() instead of kzalloc()
Linus Walleij
linus.walleij at linaro.org
Thu Aug 21 04:29:17 PDT 2025
On Tue, Aug 19, 2025 at 4:39 PM Qianfeng Rong <rongqianfeng at vivo.com> wrote:
> Replace devm_kzalloc() with devm_kcalloc() in drivers/pinctrl. As noted
> in the kernel documentation [1], open-coded multiplication in allocator
> arguments is discouraged because it can lead to integer overflow.
>
> Use devm_kcalloc() to gain built-in overflow protection, making memory
> allocation safer when calculating allocation size compared to explicit
> multiplication.
All patches applied!
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list