diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 6 |
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 | ||
422 | free_kset: | 422 | free_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 | ||
4153 | static void beiscsi_msix_enable(struct beiscsi_hba *phba) | 4155 | static void beiscsi_msix_enable(struct beiscsi_hba *phba) |