|
|
@@ -3395,6 +3395,12 @@ skip_dpc:
|
|
|
return 0;
|
|
|
|
|
|
probe_failed:
|
|
|
+ if (base_vha->gnl.l) {
|
|
|
+ dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size,
|
|
|
+ base_vha->gnl.l, base_vha->gnl.ldma);
|
|
|
+ base_vha->gnl.l = NULL;
|
|
|
+ }
|
|
|
+
|
|
|
if (base_vha->timer_active)
|
|
|
qla2x00_stop_timer(base_vha);
|
|
|
base_vha->flags.online = 0;
|
|
|
@@ -3624,7 +3630,7 @@ qla2x00_remove_one(struct pci_dev *pdev)
|
|
|
if (!atomic_read(&pdev->enable_cnt)) {
|
|
|
dma_free_coherent(&ha->pdev->dev, base_vha->gnl.size,
|
|
|
base_vha->gnl.l, base_vha->gnl.ldma);
|
|
|
-
|
|
|
+ base_vha->gnl.l = NULL;
|
|
|
scsi_host_put(base_vha->host);
|
|
|
kfree(ha);
|
|
|
pci_set_drvdata(pdev, NULL);
|
|
|
@@ -3663,6 +3669,8 @@ qla2x00_remove_one(struct pci_dev *pdev)
|
|
|
dma_free_coherent(&ha->pdev->dev,
|
|
|
base_vha->gnl.size, base_vha->gnl.l, base_vha->gnl.ldma);
|
|
|
|
|
|
+ base_vha->gnl.l = NULL;
|
|
|
+
|
|
|
vfree(base_vha->scan.l);
|
|
|
|
|
|
if (IS_QLAFX00(ha))
|
|
|
@@ -4602,6 +4610,7 @@ struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *sht,
|
|
|
"Alloc failed for scan database.\n");
|
|
|
dma_free_coherent(&ha->pdev->dev, vha->gnl.size,
|
|
|
vha->gnl.l, vha->gnl.ldma);
|
|
|
+ vha->gnl.l = NULL;
|
|
|
scsi_remove_host(vha->host);
|
|
|
return NULL;
|
|
|
}
|