Skip to content

Commit 2f9e9a7

Browse files
harshimogalapallimartinkpetersen
authored andcommitted
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>
1 parent bc7896d commit 2f9e9a7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,8 +2047,6 @@ map_cmd_status(struct fusion_context *fusion,
20472047

20482048
scmd->result = (DID_OK << 16) | ext_status;
20492049
if (ext_status == SAM_STAT_CHECK_CONDITION) {
2050-
memset(scmd->sense_buffer, 0,
2051-
SCSI_SENSE_BUFFERSIZE);
20522050
memcpy(scmd->sense_buffer, sense,
20532051
SCSI_SENSE_BUFFERSIZE);
20542052
}

0 commit comments

Comments
 (0)