summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2011-03-25 14:24:00 -0700
committerJames Bottomley <James.Bottomley@suse.de>2011-04-15 16:46:16 -0500
commit0b1d3cbf51f75eaaabdb904f02362368487e2aa7 (patch)
tree9c6a53cf353bf0ea18f1c887093ba072ba40c601 /drivers/scsi/be2iscsi
parent91eefa894add1617200c70d3886773e608de7a03 (diff)
downloadop-kernel-dev-0b1d3cbf51f75eaaabdb904f02362368487e2aa7.zip
op-kernel-dev-0b1d3cbf51f75eaaabdb904f02362368487e2aa7.tar.gz
[SCSI] be2iscsi: check boot_kset is created before destroying it
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 7fe38a4..91b354d 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -420,7 +420,8 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
return 0;
free_kset:
- iscsi_boot_destroy_kset(phba->boot_kset);
+ if (phba->boot_kset)
+ iscsi_boot_destroy_kset(phba->boot_kset);
return -ENOMEM;
}
@@ -4144,10 +4145,11 @@ static void beiscsi_remove(struct pci_dev *pcidev)
phba->ctrl.mbox_mem_alloced.size,
phba->ctrl.mbox_mem_alloced.va,
phba->ctrl.mbox_mem_alloced.dma);
+ if (phba->boot_kset)
+ iscsi_boot_destroy_kset(phba->boot_kset);
iscsi_host_remove(phba->shost);
pci_dev_put(phba->pcidev);
iscsi_host_free(phba->shost);
- iscsi_boot_destroy_kset(phba->boot_kset);
}
static void beiscsi_msix_enable(struct beiscsi_hba *phba)
OpenPOWER on IntegriCloud