* [patch] scsi/qla2xxx: fix end of loop test
@ 2010-05-22 20:37 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-22 20:37 UTC (permalink / raw)
To: Andrew Vasquez
Cc: linux-driver, James E.J. Bottomley, Giridhar Malavali,
Harish Zunjarrao, Stephen Rothwell, linux-scsi, kernel-janitors
The "fcport" variable is never null here. I've updated the condition to
test for the end of the list_for_each_entry() loop.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index b905dfe..14ca275 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -1050,7 +1050,7 @@ qla24xx_iidma(struct fc_bsg_job *bsg_job)
break;
}
- if (!fcport) {
+ if (&fcport->list == &vha->vp_fcports) {
DEBUG2(printk(KERN_ERR "%s(%ld): Failed to find port\n",
__func__, vha->host_no));
return -EINVAL;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-22 20:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:37 [patch] scsi/qla2xxx: fix end of loop test Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).