diff options
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/module.c b/kernel/module.c index 89cd4c7361d8..dcb8a2cbf75e 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -1257,9 +1257,8 @@ int mod_sysfs_setup(struct module *mod, | |||
1257 | out_unreg_param: | 1257 | out_unreg_param: |
1258 | module_param_sysfs_remove(mod); | 1258 | module_param_sysfs_remove(mod); |
1259 | out_unreg_holders: | 1259 | out_unreg_holders: |
1260 | kobject_unregister(mod->holders_dir); | 1260 | kobject_put(mod->holders_dir); |
1261 | out_unreg: | 1261 | out_unreg: |
1262 | kobject_del(&mod->mkobj.kobj); | ||
1263 | kobject_put(&mod->mkobj.kobj); | 1262 | kobject_put(&mod->mkobj.kobj); |
1264 | return err; | 1263 | return err; |
1265 | } | 1264 | } |
@@ -1269,9 +1268,9 @@ static void mod_kobject_remove(struct module *mod) | |||
1269 | { | 1268 | { |
1270 | module_remove_modinfo_attrs(mod); | 1269 | module_remove_modinfo_attrs(mod); |
1271 | module_param_sysfs_remove(mod); | 1270 | module_param_sysfs_remove(mod); |
1272 | kobject_unregister(mod->mkobj.drivers_dir); | 1271 | kobject_put(mod->mkobj.drivers_dir); |
1273 | kobject_unregister(mod->holders_dir); | 1272 | kobject_put(mod->holders_dir); |
1274 | kobject_unregister(&mod->mkobj.kobj); | 1273 | kobject_put(&mod->mkobj.kobj); |
1275 | } | 1274 | } |
1276 | 1275 | ||
1277 | /* | 1276 | /* |