mirror of https://gitee.com/openkylin/linux.git
[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>
This commit is contained in:
parent
91eefa894a
commit
0b1d3cbf51
|
@ -420,6 +420,7 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
free_kset:
|
free_kset:
|
||||||
|
if (phba->boot_kset)
|
||||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||||
return -ENOMEM;
|
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.size,
|
||||||
phba->ctrl.mbox_mem_alloced.va,
|
phba->ctrl.mbox_mem_alloced.va,
|
||||||
phba->ctrl.mbox_mem_alloced.dma);
|
phba->ctrl.mbox_mem_alloced.dma);
|
||||||
|
if (phba->boot_kset)
|
||||||
|
iscsi_boot_destroy_kset(phba->boot_kset);
|
||||||
iscsi_host_remove(phba->shost);
|
iscsi_host_remove(phba->shost);
|
||||||
pci_dev_put(phba->pcidev);
|
pci_dev_put(phba->pcidev);
|
||||||
iscsi_host_free(phba->shost);
|
iscsi_host_free(phba->shost);
|
||||||
iscsi_boot_destroy_kset(phba->boot_kset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void beiscsi_msix_enable(struct beiscsi_hba *phba)
|
static void beiscsi_msix_enable(struct beiscsi_hba *phba)
|
||||||
|
|
Loading…
Reference in New Issue