[PATCH 60/87] scsi: megaraid: remove memset after kcalloc
From: Fuqian Huang
Date: Thu Jun 27 2019 - 13:44:31 EST
kcalloc already zeros the memory.
memset is unneeded.
Signed-off-by: Fuqian Huang <huangfq.daxian@xxxxxxxxx>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 3dd1df472dc6..342b39bc9210 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4141,8 +4141,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);
--
2.11.0