* [patch] scsi/qla2xxx: checking for null cleanups
@ 2010-05-22 20:30 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-22 20:30 UTC (permalink / raw)
To: Andrew Vasquez
Cc: linux-driver, James E.J. Bottomley, Giridhar Malavali,
Anirban Chakraborty, linux-scsi, kernel-janitors
These are two cleanups to make the static checkers happy. The "vha" is
used as the list cursor and can never be null so I removed the check. I
also modified qla2x00_request_firmware() to avoid a theoretical null
dereference. This is unlikely to happen I think, but it makes auditing
easier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index be1a8fc..d306853 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2354,7 +2354,7 @@ qla2x00_remove_one(struct pci_dev *pdev)
ha = base_vha->hw;
list_for_each_entry_safe(vha, temp, &ha->vp_list, list) {
- if (vha && vha->fc_vport)
+ if (vha->fc_vport)
fc_vport_terminate(vha->fc_vport);
}
@@ -3689,6 +3689,8 @@ qla2x00_request_firmware(scsi_qla_host_t *vha)
blob = &qla_fw_blobs[FW_ISP81XX];
} else if (IS_QLA82XX(ha)) {
blob = &qla_fw_blobs[FW_ISP82XX];
+ } else {
+ return NULL;
}
mutex_lock(&qla_fw_lock);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-22 20:30 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:30 [patch] scsi/qla2xxx: checking for null cleanups 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).