aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-02-14 15:03:39 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-16 18:19:17 -0500
commitb92be9f1ecd3c8b16e9bb22d55bb97b3d89f091a (patch)
tree6f5b561fd2268214d3b511f6dc8e0c1a598f24b7 /kernel/module.c
parent1350770112bd9bd5696cb52deb712370012d80e0 (diff)
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>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 225501f620ff..e06b77af23fd 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1180,11 +1180,8 @@ static void mod_kobject_remove(struct module *mod)
1180{ 1180{
1181 module_remove_modinfo_attrs(mod); 1181 module_remove_modinfo_attrs(mod);
1182 module_param_sysfs_remove(mod); 1182 module_param_sysfs_remove(mod);
1183 if (mod->mkobj.drivers_dir) 1183 kobject_unregister(mod->mkobj.drivers_dir);
1184 kobject_unregister(mod->mkobj.drivers_dir); 1184 kobject_unregister(mod->holders_dir);
1185 if (mod->holders_dir)
1186 kobject_unregister(mod->holders_dir);
1187
1188 kobject_unregister(&mod->mkobj.kobj); 1185 kobject_unregister(&mod->mkobj.kobj);
1189} 1186}
1190 1187