scsi: megaraid_sas: Remove unnecessary memset
instance->cmd_list is allocated by kcalloc(). The memory is already set to zero. It is unnecessary to call memset again. Link: https://lore.kernel.org/r/20220407072442.4137977-1-wanjiabing@vivo.com Acked-by: Sumit Saxena <sumit.saxena@broadcom.com> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Родитель
0848ccaea6
Коммит
3a6a7187f0
|
@ -4466,8 +4466,6 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(instance->cmd_list, 0, sizeof(struct megasas_cmd *) *max_cmd);
|
||||
|
||||
for (i = 0; i < max_cmd; i++) {
|
||||
instance->cmd_list[i] = kmalloc(sizeof(struct megasas_cmd),
|
||||
GFP_KERNEL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче