scsi/qla2xxx: checking for null cleanups
Subsystems (3)
PATCH 1/1 scsi/qla2xxx: checking for null cleanups
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 <[email protected]>
drivers/scsi/qla2xxx/qla_os.c +3 -1
@@ -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);