[SCSI] iscsi_boot_sysfs: have this module check for null on destruction

This moves the check for NULL boot_sets to the iscsi_boot_sysfs
module instead of having the drivers do it.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
这个提交包含在:
Mike Christie
2011-06-24 15:11:52 -05:00
提交者 James Bottomley
父节点 c682d602d0
当前提交 9d04516310
修改 2 个文件,包含 5 行新增4 行删除

查看文件

@@ -420,8 +420,7 @@ static int beiscsi_setup_boot_info(struct beiscsi_hba *phba)
return 0;
free_kset:
if (phba->boot_kset)
iscsi_boot_destroy_kset(phba->boot_kset);
iscsi_boot_destroy_kset(phba->boot_kset);
return -ENOMEM;
}
@@ -4149,8 +4148,7 @@ 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_boot_destroy_kset(phba->boot_kset);
iscsi_host_remove(phba->shost);
pci_dev_put(phba->pcidev);
iscsi_host_free(phba->shost);