Driver: remove redundant kobject_unregister checks
Here is a patch that removes all redundant kobject_unregister argument checks. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1350770112
commit
b92be9f1ec
@@ -163,8 +163,7 @@ int class_register(struct class * cls)
|
||||
void class_unregister(struct class * cls)
|
||||
{
|
||||
pr_debug("device class '%s': unregistering\n", cls->name);
|
||||
if (cls->virtual_dir)
|
||||
kobject_unregister(cls->virtual_dir);
|
||||
kobject_unregister(cls->virtual_dir);
|
||||
remove_class_attrs(cls);
|
||||
subsystem_unregister(&cls->subsys);
|
||||
}
|
||||
|
Reference in New Issue
Block a user