Skip to content

Commit bba20b8

Browse files
tititiou36martinkpetersen
authored andcommitted
scsi: scsi_debug: Remove a useless memset()
'arr' is kzalloc()'ed, so there is no need to call memset(.., 0, ...) on it. It is already cleared. This is a follow up of commit b952eb2 ("scsi: scsi_debug: Allocate the MODE SENSE response from the heap"). Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/6296722174e39a51cac74b7fc68b0d75bd0db2a3.1725690433.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 4708c93 commit bba20b8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/scsi/scsi_debug.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,6 @@ static int resp_mode_sense(struct scsi_cmnd *scp,
27602760
else
27612761
bd_len = 0;
27622762
alloc_len = msense_6 ? cmd[4] : get_unaligned_be16(cmd + 7);
2763-
memset(arr, 0, SDEBUG_MAX_MSENSE_SZ);
27642763
if (0x3 == pcontrol) { /* Saving values not supported */
27652764
mk_sense_buffer(scp, ILLEGAL_REQUEST, SAVING_PARAMS_UNSUP, 0);
27662765
return check_condition_result;

0 commit comments

Comments
 (0)