aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-02-11 14:03:18 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-02-24 04:29:34 -0500
commit208afec4f3be8c51ad6eebe6611dd6d2ad2fa298 (patch)
treea06e762057b8a23ae4f9f2f1e74000592a1aa032
parent4d24834dfd25f2dab5977241cd5a6662edde92f7 (diff)
[SCSI] dc395x: uninitialized variable in device_alloc()
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> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/dc395x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 865c64fa923c..fed486bfd3f4 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -3747,13 +3747,13 @@ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb,
3747 dcb->max_command = 1; 3747 dcb->max_command = 1;
3748 dcb->target_id = target; 3748 dcb->target_id = target;
3749 dcb->target_lun = lun; 3749 dcb->target_lun = lun;
3750 dcb->dev_mode = eeprom->target[target].cfg0;
3750#ifndef DC395x_NO_DISCONNECT 3751#ifndef DC395x_NO_DISCONNECT
3751 dcb->identify_msg = 3752 dcb->identify_msg =
3752 IDENTIFY(dcb->dev_mode & NTC_DO_DISCONNECT, lun); 3753 IDENTIFY(dcb->dev_mode & NTC_DO_DISCONNECT, lun);
3753#else 3754#else
3754 dcb->identify_msg = IDENTIFY(0, lun); 3755 dcb->identify_msg = IDENTIFY(0, lun);
3755#endif 3756#endif
3756 dcb->dev_mode = eeprom->target[target].cfg0;
3757 dcb->inquiry7 = 0; 3757 dcb->inquiry7 = 0;
3758 dcb->sync_mode = 0; 3758 dcb->sync_mode = 0;
3759 dcb->min_nego_period = clock_period[period_index]; 3759 dcb->min_nego_period = clock_period[period_index];