aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2011-03-25 17:24:00 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-04-15 17:46:16 -0400
commit0b1d3cbf51f75eaaabdb904f02362368487e2aa7 (patch)
tree9c6a53cf353bf0ea18f1c887093ba072ba40c601 /drivers
parent91eefa894add1617200c70d3886773e608de7a03 (diff)
[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')
-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 7fe38a49bbb7..91b354daf94b 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)
420 return 0; 420 return 0;
421 421
422free_kset: 422free_kset:
423 iscsi_boot_destroy_kset(phba->boot_kset); 423 if (phba->boot_kset)
424 iscsi_boot_destroy_kset(phba->boot_kset);
424 return -ENOMEM; 425 return -ENOMEM;
425} 426}
426 427
@@ -4144,10 +4145,11 @@ static void beiscsi_remove(struct pci_dev *pcidev)
4144 phba->ctrl.mbox_mem_alloced.size, 4145 phba->ctrl.mbox_mem_alloced.size,
4145 phba->ctrl.mbox_mem_alloced.va, 4146 phba->ctrl.mbox_mem_alloced.va,
4146 phba->ctrl.mbox_mem_alloced.dma); 4147 phba->ctrl.mbox_mem_alloced.dma);
4148 if (phba->boot_kset)
4149 iscsi_boot_destroy_kset(phba->boot_kset);
4147 iscsi_host_remove(phba->shost); 4150 iscsi_host_remove(phba->shost);
4148 pci_dev_put(phba->pcidev); 4151 pci_dev_put(phba->pcidev);
4149 iscsi_host_free(phba->shost); 4152 iscsi_host_free(phba->shost);
4150 iscsi_boot_destroy_kset(phba->boot_kset);
4151} 4153}
4152 4154
4153static void beiscsi_msix_enable(struct beiscsi_hba *phba) 4155static void beiscsi_msix_enable(struct beiscsi_hba *phba)