aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 58da7f64c22f..72a47ce7a1d3 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -342,12 +342,12 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
342 sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); 342 sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
343 if (!sense) 343 if (!sense)
344 return DRIVER_ERROR << 24; 344 return DRIVER_ERROR << 24;
345 memset(sense, 0, sizeof(*sense)); 345 memset(sense, 0, SCSI_SENSE_BUFFERSIZE);
346 } 346 }
347 result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, 347 result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
348 sense, timeout, retries, 0); 348 sense, timeout, retries, 0);
349 if (sshdr) 349 if (sshdr)
350 scsi_normalize_sense(sense, sizeof(*sense), sshdr); 350 scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr);
351 351
352 kfree(sense); 352 kfree(sense);
353 return result; 353 return result;