mirror of https://github.com/torvalds/linux.git
soc: fsl: qbman: use kmalloc_array() instead of kmalloc()
Replace kmalloc() with kmalloc_array() to prevent potential overflow, as recommended in Documentation/process/deprecated.rst. Signed-off-by: Gongwei Li <ligongwei@kylinos.cn> Reviewed-by: Fushuai Wang <wangfushuai@baidu.com> Link: https://lore.kernel.org/r/20251121061022.114609-1-13875017792@163.com Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
This commit is contained in:
parent
c181703a29
commit
760b8eec2c
|
|
@ -219,7 +219,7 @@ static int allocate_frame_data(void)
|
|||
|
||||
pcfg = qman_get_qm_portal_config(qman_dma_portal);
|
||||
|
||||
__frame_ptr = kmalloc(4 * HP_NUM_WORDS, GFP_KERNEL);
|
||||
__frame_ptr = kmalloc_array(4, HP_NUM_WORDS, GFP_KERNEL);
|
||||
if (!__frame_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue