Re: [PATCH v2] PCI: keystone: Use kcalloc() instead of kzalloc()
From: Manivannan Sadhasivam
Date: Wed Aug 27 2025 - 10:04:51 EST
On Tue, 19 Aug 2025 21:12:33 +0800, Qianfeng Rong wrote:
> Replace calls of devm_kzalloc() with devm_kcalloc() in ks_pcie_probe().
> 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.
>
> [...]
Applied, thanks!
[1/1] PCI: keystone: Use kcalloc() instead of kzalloc()
commit: ffdd27d36265be108827c606c9fbe81a5947547e
Best regards,
--
Manivannan Sadhasivam <mani@xxxxxxxxxx>