summary refs log tree commit diff
path: root/drivers/scsi/iscsi_boot_sysfs.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-06-24 15:11:52 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 16:43:03 -0500
commit9d04516310aaef3970c642a54531a52123001178 (patch)
tree2e1948a93a6a136ebfc9f1ad08b6ab4d200b05cc /drivers/scsi/iscsi_boot_sysfs.c
parentc682d602d0f9751c92e07c196be27d8fac6ec3ed (diff)
downloadlinux-9d04516310aaef3970c642a54531a52123001178.tar.gz
[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>
Diffstat (limited to 'drivers/scsi/iscsi_boot_sysfs.c')
-rw-r--r--drivers/scsi/iscsi_boot_sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index df6bff7366cf..4274ce93d8f2 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
@@ -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);