mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
scsi: ipr: Use vmalloc_array() to simplify code
Use vmalloc_array() instead of vmalloc() to simplify the function ipr_alloc_dump(). Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Link: https://lore.kernel.org/r/20250806124633.383426-2-rongqianfeng@vivo.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
e115d3d70e
commit
daedd69abf
+4
-4
@@ -4281,11 +4281,11 @@ static int ipr_alloc_dump(struct ipr_ioa_cfg *ioa_cfg)
|
||||
}
|
||||
|
||||
if (ioa_cfg->sis64)
|
||||
ioa_data = vmalloc(array_size(IPR_FMT3_MAX_NUM_DUMP_PAGES,
|
||||
sizeof(__be32 *)));
|
||||
ioa_data = vmalloc_array(IPR_FMT3_MAX_NUM_DUMP_PAGES,
|
||||
sizeof(__be32 *));
|
||||
else
|
||||
ioa_data = vmalloc(array_size(IPR_FMT2_MAX_NUM_DUMP_PAGES,
|
||||
sizeof(__be32 *)));
|
||||
ioa_data = vmalloc_array(IPR_FMT2_MAX_NUM_DUMP_PAGES,
|
||||
sizeof(__be32 *));
|
||||
|
||||
if (!ioa_data) {
|
||||
ipr_err("Dump memory allocation failed\n");
|
||||
|
||||
Reference in New Issue
Block a user