mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
qla2x00t: Avoid reading uninitialized memory
Reported-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4644 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2805,6 +2805,8 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha,
|
||||
rptid_entry->port_id[2], rptid_entry->port_id[1],
|
||||
rptid_entry->port_id[0]));
|
||||
} else if (rptid_entry->format == 1) {
|
||||
bool found;
|
||||
|
||||
vp_idx = LSB(stat);
|
||||
DEBUG15(printk("%s:format 1: scsi(%ld): VP[%d] enabled "
|
||||
"- status %d - "
|
||||
@@ -2818,11 +2820,14 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha,
|
||||
if (MSB(stat) == 1)
|
||||
return;
|
||||
|
||||
found = false;
|
||||
list_for_each_entry(vha, &ha->vp_list, vp_list)
|
||||
if (vp_idx == vha->vp_idx)
|
||||
if (vp_idx == vha->vp_idx) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!vha)
|
||||
if (!found)
|
||||
return;
|
||||
|
||||
vha->d_id.b.domain = rptid_entry->port_id[2];
|
||||
|
||||
Reference in New Issue
Block a user