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

Commit 460f7e9a authored by Dmitriy Monakhov's avatar Dmitriy Monakhov Committed by Greg Kroah-Hartman
Browse files

kobject: kobject_shadow_add cleanup



 - correct function name in comments
 - parrent assignment does metter only inside "if" block, 
   so move it inside this block.

Signed-off-by: default avatarMonakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 414264f9
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -157,7 +157,7 @@ static void unlink(struct kobject * kobj)
}
}


/**
/**
 *	kobject_add - add an object to the hierarchy.
 *	kobject_shadow_add - add an object to the hierarchy.
 *	@kobj:	object.
 *	@kobj:	object.
 *	@shadow_parent: sysfs directory to add to.
 *	@shadow_parent: sysfs directory to add to.
 */
 */
@@ -190,8 +190,8 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent)


		list_add_tail(&kobj->entry,&kobj->kset->list);
		list_add_tail(&kobj->entry,&kobj->kset->list);
		spin_unlock(&kobj->kset->list_lock);
		spin_unlock(&kobj->kset->list_lock);
	}
		kobj->parent = parent;
		kobj->parent = parent;
	}


	error = create_dir(kobj, shadow_parent);
	error = create_dir(kobj, shadow_parent);
	if (error) {
	if (error) {