diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2022-04-07 10:24:42 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-04-12 04:55:12 +0300 |
commit | 3a6a7187f09a0b1add76aaf4015f215a381ab616 (patch) | |
tree | 2d0d76400a8488255c4877945fcfbae3ef5f6330 /drivers/scsi | |
parent | 0848ccaea664970e559d99348484615ba0f7ab63 (diff) | |
download | linux-3a6a7187f09a0b1add76aaf4015f215a381ab616.tar.xz |
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 8bf72dbc33b7..33f3226023f3 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -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); |