projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d24834
)
[SCSI] dc395x: uninitialized variable in device_alloc()
author
Dan Carpenter
<
[email protected]
>
Mon, 11 Feb 2013 19:03:18 +0000
(22:03 +0300)
committer
James Bottomley
<
[email protected]
>
Sun, 24 Feb 2013 09:29:34 +0000
(09:29 +0000)
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 <
[email protected]
>
Acked-by: Oliver Neukum <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: James Bottomley <
[email protected]
>
drivers/scsi/dc395x.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/dc395x.c
b/drivers/scsi/dc395x.c
index 865c64fa923c1483804b48469bb962689742b84c..fed486bfd3f462a9afbd2a0ed4360a069526ee7e 100644
(file)
--- 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];