From 8ae598d02517af967685a671303c4ed10cded3c4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 21 Dec 2010 16:00:15 -0800 Subject: [SCSI] qla2xxx: list cursors are not null This is just a cleanup. The unneeded NULL check annoys static checkers because we already derefenced it and the we check it and then (if it's not the _safe() version) we dereference it again without checking. And the static checker is all, "Wah? Is it null or not?" Signed-off-by: Dan Carpenter Signed-off-by: Madhuranath Iyengar Signed-off-by: James Bottomley --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/qla2xxx') diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 6f7cf397038..e9b800e7255 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3888,7 +3888,7 @@ qla2x00_update_fcports(scsi_qla_host_t *base_vha) list_for_each_entry(vha, &base_vha->hw->vp_list, list) { atomic_inc(&vha->vref_count); list_for_each_entry(fcport, &vha->vp_fcports, list) { - if (fcport && fcport->drport && + if (fcport->drport && atomic_read(&fcport->state) != FCS_UNCONFIGURED) { spin_unlock_irqrestore(&ha->vport_slock, flags); diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index df2c1e7ab65..1814df86852 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -2371,7 +2371,7 @@ qla2x00_remove_one(struct pci_dev *pdev) list_for_each_entry(vha, &ha->vp_list, list) { atomic_inc(&vha->vref_count); - if (vha && vha->fc_vport) { + if (vha->fc_vport) { spin_unlock_irqrestore(&ha->vport_slock, flags); fc_vport_terminate(vha->fc_vport); -- cgit v1.2.3