summaryrefslogtreecommitdiff
path: root/rust/helpers/workqueue.c
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-08-19 21:51:55 +0800
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-08-28 14:53:35 +0300
commit55df384148396c0503cfc51a9c7177df6a423843 (patch)
treecc88c5feee34a467dc4126748f5d586356123f46 /rust/helpers/workqueue.c
parent6d47b4f08436cb682fb2644e6265a3897fd42a77 (diff)
platform/x86/intel/pmc: use kcalloc() instead of kzalloc()
Replace devm_kzalloc() with devm_kcalloc() in pmc_core_get_tgl_lpm_reqs(). 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 Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Acked-by: David E. Box <david.e.box@intel.com> Link: https://lore.kernel.org/r/20250819135155.338380-1-rongqianfeng@vivo.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions