summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-06-19 17:30:41 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-06-27 05:08:30 +0300
commit1fc98aaf7f85fadcca57c4a86ef17e1940cad2d3 (patch)
tree6c7d9e3352647c299ffd24d925379d722d97e410 /drivers/scsi/qla2xxx/qla_init.c
parentafe89f115e84edbc76d316759e206580a06c6973 (diff)
downloadlinux-1fc98aaf7f85fadcca57c4a86ef17e1940cad2d3.tar.xz
scsi: qla2xxx: Fix a condition in qla2x00_find_all_fabric_devs()
This code doesn't make sense unless the correct "fcport" was found. Link: https://lore.kernel.org/r/20200619143041.GD267142@mwanda Fixes: 9dd9686b1419 ("scsi: qla2xxx: Add changes for devloss timeout in driver") Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Shyam Sundar <ssundar@marvell.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 4576d3ae9937..2436a17f5cd9 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5944,7 +5944,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha)
break;
}
- if (NVME_TARGET(vha->hw, fcport)) {
+ if (found && NVME_TARGET(vha->hw, fcport)) {
if (fcport->disc_state == DSC_DELETE_PEND) {
qla2x00_set_fcport_disc_state(fcport, DSC_GNL);
vha->fcport_count--;