aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 96def1ddba19..1417e5cd4c6f 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -163,8 +163,7 @@ int class_register(struct class * cls)
163void class_unregister(struct class * cls) 163void class_unregister(struct class * cls)
164{ 164{
165 pr_debug("device class '%s': unregistering\n", cls->name); 165 pr_debug("device class '%s': unregistering\n", cls->name);
166 if (cls->virtual_dir) 166 kobject_unregister(cls->virtual_dir);
167 kobject_unregister(cls->virtual_dir);
168 remove_class_attrs(cls); 167 remove_class_attrs(cls);
169 subsystem_unregister(&cls->subsys); 168 subsystem_unregister(&cls->subsys);
170} 169}