diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2022-05-05 17:32:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-20 03:16:26 +0300 |
commit | 2f9e9a7b0ce38471c6f22a762adca6a977edfa7d (patch) | |
tree | 14dcc6055e95806f30d224a97abc58aa64b7aaa4 /drivers/scsi/megaraid/megaraid_sas_fusion.c | |
parent | bc7896d31a922ee9caabb10dc07509f65d41dc0e (diff) | |
download | linux-2f9e9a7b0ce38471c6f22a762adca6a977edfa7d.tar.xz |
scsi: megaraid_sas: Remove redundant memset() statement
As memset() of scmd->sense_buffer is immediately followed by a memcpy()
where scmd->sense_buffer is the destination. The memset() is redundant.
Link: https://lore.kernel.org/r/20220505143214.44908-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fusion.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 54fde2661952..5b5885d9732b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -2047,8 +2047,6 @@ map_cmd_status(struct fusion_context *fusion, scmd->result = (DID_OK << 16) | ext_status; if (ext_status == SAM_STAT_CHECK_CONDITION) { - memset(scmd->sense_buffer, 0, - SCSI_SENSE_BUFFERSIZE); memcpy(scmd->sense_buffer, sense, SCSI_SENSE_BUFFERSIZE); } |