diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-02-11 22:03:18 +0300 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-20 15:03:17 +0000 |
commit | ae651768e63cb9007aadf9c807ff9d8e3daedf8d (patch) | |
tree | 9f75bf6947de45d64b8eca8028949b1738f4767b | |
parent | 4dd30e2ee429fe6b53ccd2693282bc3faa12c6dc (diff) | |
download | lwn-ae651768e63cb9007aadf9c807ff9d8e3daedf8d.tar.gz lwn-ae651768e63cb9007aadf9c807ff9d8e3daedf8d.zip |
dc395x: uninitialized variable in device_alloc()
commit 208afec4f3be8c51ad6eebe6611dd6d2ad2fa298 upstream.
This bug was introduced back in bitkeeper days in 2003. We use
"dcb->dev_mode" before it has been initialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/scsi/dc395x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index f5b718d3c31b..aed7756bdbc1 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -3747,13 +3747,13 @@ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb, dcb->max_command = 1; dcb->target_id = target; dcb->target_lun = lun; + dcb->dev_mode = eeprom->target[target].cfg0; #ifndef DC395x_NO_DISCONNECT dcb->identify_msg = IDENTIFY(dcb->dev_mode & NTC_DO_DISCONNECT, lun); #else dcb->identify_msg = IDENTIFY(0, lun); #endif - dcb->dev_mode = eeprom->target[target].cfg0; dcb->inquiry7 = 0; dcb->sync_mode = 0; dcb->min_nego_period = clock_period[period_index]; |