diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 4362dcde74af..1fe4fd83e305 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -286,13 +286,12 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
286 | int result; | 286 | int result; |
287 | 287 | ||
288 | if (sshdr) { | 288 | if (sshdr) { |
289 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO); | 289 | sense = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO); |
290 | if (!sense) | 290 | if (!sense) |
291 | return DRIVER_ERROR << 24; | 291 | return DRIVER_ERROR << 24; |
292 | memset(sense, 0, SCSI_SENSE_BUFFERSIZE); | ||
293 | } | 292 | } |
294 | result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, | 293 | result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, |
295 | sense, timeout, retries, 0); | 294 | sense, timeout, retries, 0); |
296 | if (sshdr) | 295 | if (sshdr) |
297 | scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); | 296 | scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, sshdr); |
298 | 297 | ||