From b92be9f1ecd3c8b16e9bb22d55bb97b3d89f091a Mon Sep 17 00:00:00 2001 From: Mariusz Kozlowski Date: Wed, 14 Feb 2007 21:03:39 +0100 Subject: Driver: remove redundant kobject_unregister checks Here is a patch that removes all redundant kobject_unregister argument checks. Signed-off-by: Mariusz Kozlowski Signed-off-by: Greg Kroah-Hartman --- kernel/module.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'kernel') 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) { module_remove_modinfo_attrs(mod); module_param_sysfs_remove(mod); - if (mod->mkobj.drivers_dir) - kobject_unregister(mod->mkobj.drivers_dir); - if (mod->holders_dir) - kobject_unregister(mod->holders_dir); - + kobject_unregister(mod->mkobj.drivers_dir); + kobject_unregister(mod->holders_dir); kobject_unregister(&mod->mkobj.kobj); } -- cgit v1.2.3