Skip to content

Commit

Permalink
[SCSI] fix C syntax problem in scsi_lib.c
Browse files Browse the repository at this point in the history
Older gcc's require variable definitions at the beginning of a block.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
akpm@osdl.org authored and James Bottomley committed Aug 28, 2005
1 parent 84743bb commit 1ccb48b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,15 @@ int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
struct scsi_sense_hdr *sshdr, int timeout, int retries)
{
char *sense = NULL;

int result;

if (sshdr) {
sense = kmalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL);
if (!sense)
return DRIVER_ERROR << 24;
memset(sense, 0, sizeof(*sense));
}
int result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
sense, timeout, retries, 0);
if (sshdr)
scsi_normalize_sense(sense, sizeof(*sense), sshdr);
Expand Down

0 comments on commit 1ccb48b

Please sign in to comment.