summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_mr.c
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2014-09-25 13:16:44 +0400
committerChristoph Hellwig <hch@lst.de>2014-09-25 16:25:02 +0400
commit24a42d50efdbb279f26c179e980e3420532fdf2a (patch)
treed3ddbe79f8c82837be8cf32259e72951aaf0bc51 /drivers/scsi/qla2xxx/qla_mr.c
parent7b711623e1924b4ca1b06610f694c71b0feb05f9 (diff)
downloadlinux-24a42d50efdbb279f26c179e980e3420532fdf2a.tar.xz
qla2xxx: Incorrect linked list semantic in qlafx00_get_fcport().
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index 8ecf6decea67..620e60a7a0ee 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -1675,17 +1675,16 @@ qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id)
fc_port_t *fcport;
/* Check for matching device in remote port list. */
- fcport = NULL;
list_for_each_entry(fcport, &vha->vp_fcports, list) {
if (fcport->tgt_id == tgt_id) {
ql_dbg(ql_dbg_async, vha, 0x5072,
"Matching fcport(%p) found with TGT-ID: 0x%x "
"and Remote TGT_ID: 0x%x\n",
fcport, fcport->tgt_id, tgt_id);
- break;
+ return fcport;
}
}
- return fcport;
+ return NULL;
}
static void