diff options
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 2b6782d1f80b..dc0fe52c972e 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
| @@ -3141,6 +3141,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, | |||
| 3141 | struct qla_hw_data *ha = vha->hw; | 3141 | struct qla_hw_data *ha = vha->hw; |
| 3142 | scsi_qla_host_t *vp; | 3142 | scsi_qla_host_t *vp; |
| 3143 | unsigned long flags; | 3143 | unsigned long flags; |
| 3144 | int found; | ||
| 3144 | 3145 | ||
| 3145 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10b6, | 3146 | ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x10b6, |
| 3146 | "Entered %s.\n", __func__); | 3147 | "Entered %s.\n", __func__); |
| @@ -3176,13 +3177,17 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, | |||
| 3176 | return; | 3177 | return; |
| 3177 | } | 3178 | } |
| 3178 | 3179 | ||
| 3180 | found = 0; | ||
| 3179 | spin_lock_irqsave(&ha->vport_slock, flags); | 3181 | spin_lock_irqsave(&ha->vport_slock, flags); |
| 3180 | list_for_each_entry(vp, &ha->vp_list, list) | 3182 | list_for_each_entry(vp, &ha->vp_list, list) { |
| 3181 | if (vp_idx == vp->vp_idx) | 3183 | if (vp_idx == vp->vp_idx) { |
| 3184 | found = 1; | ||
| 3182 | break; | 3185 | break; |
| 3186 | } | ||
| 3187 | } | ||
| 3183 | spin_unlock_irqrestore(&ha->vport_slock, flags); | 3188 | spin_unlock_irqrestore(&ha->vport_slock, flags); |
| 3184 | 3189 | ||
| 3185 | if (!vp) | 3190 | if (!found) |
| 3186 | return; | 3191 | return; |
| 3187 | 3192 | ||
| 3188 | vp->d_id.b.domain = rptid_entry->port_id[2]; | 3193 | vp->d_id.b.domain = rptid_entry->port_id[2]; |
