diff options
| author | Gongwei Li <ligongwei@kylinos.cn> | 2025-11-21 14:10:22 +0800 |
|---|---|---|
| committer | Christophe Leroy (CS GROUP) <chleroy@kernel.org> | 2025-11-26 12:29:40 +0100 |
| commit | 760b8eec2cf861c5b013f62c4af8ee06c959853e (patch) | |
| tree | 5cf55b0217e45f5794245215e0736b6caee2d59e | |
| parent | c181703a290a13c088ca2ac7b984ec8e676acb2b (diff) | |
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>
| -rw-r--r-- | drivers/soc/fsl/qbman/qman_test_stash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c index 6f7597950aa3..6009e8b32c44 100644 --- a/drivers/soc/fsl/qbman/qman_test_stash.c +++ b/drivers/soc/fsl/qbman/qman_test_stash.c @@ -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; |