From: akpm@osdl.org Date: Sun, 26 Jun 2005 07:12:51 +0000 (-0700) Subject: [SCSI] fix C syntax problem in scsi_lib.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1ccb48bb163853c24840c0a50c2a6df1affe029c;p=linux-beck.git [SCSI] fix C syntax problem in scsi_lib.c Older gcc's require variable definitions at the beginning of a block. Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- 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, 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);