Commit 1fc98aaf authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen

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: 9dd9686b ("scsi: qla2xxx: Add changes for devloss timeout in driver")
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: default avatarShyam Sundar <ssundar@marvell.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent afe89f11
......@@ -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--;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment