Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d045163 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[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: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent c682d602
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -420,7 +420,6 @@ 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);
	return -ENOMEM;
}
@@ -4149,7 +4148,6 @@ 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);
+3 −0
Original line number Diff line number Diff line
@@ -472,6 +472,9 @@ void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset)
{
	struct iscsi_boot_kobj *boot_kobj, *tmp_kobj;

	if (!boot_kset)
		return;

	list_for_each_entry_safe(boot_kobj, tmp_kobj,
				 &boot_kset->kobj_list, list)
		iscsi_boot_remove_kobj(boot_kobj);