diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index bdea26b56dc4..58da7f64c22f 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -336,14 +336,15 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
336 | struct scsi_sense_hdr *sshdr, int timeout, int retries) | 336 | struct scsi_sense_hdr *sshdr, int timeout, int retries) |
337 | { | 337 | { |
338 | char *sense = NULL; | 338 | char *sense = NULL; |
339 | 339 | int result; | |
340 | |||
340 | if (sshdr) { | 341 | if (sshdr) { |
341 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); | 342 | sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); |
342 | if (!sense) | 343 | if (!sense) |
343 | return DRIVER_ERROR << 24; | 344 | return DRIVER_ERROR << 24; |
344 | memset(sense, 0, sizeof(*sense)); | 345 | memset(sense, 0, sizeof(*sense)); |
345 | } | 346 | } |
346 | int result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, | 347 | result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, |
347 | sense, timeout, retries, 0); | 348 | sense, timeout, retries, 0); |
348 | if (sshdr) | 349 | if (sshdr) |
349 | scsi_normalize_sense(sense, sizeof(*sense), sshdr); | 350 | scsi_normalize_sense(sense, sizeof(*sense), sshdr); |