Re: [PATCH 0/4] pinctrl: use kcalloc() instead of kzalloc()

From: Linus Walleij
Date: Thu Aug 21 2025 - 07:32:47 EST


On Tue, Aug 19, 2025 at 4:39 PM Qianfeng Rong <rongqianfeng@xxxxxxxx> 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