Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75862
b: refs/heads/master
c: 78a2d90
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 3b6eabf commit 10b70d1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 197b12d6796a3bca187f22a8978a33d51e2bcd79
refs/heads/master: 78a2d906b40fe530ea800c1e873bfe8f02326f1e
2 changes: 1 addition & 1 deletion trunk/kernel/ksysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static int __init ksysfs_init(void)
group_exit:
sysfs_remove_group(kernel_kobj, &kernel_attr_group);
kset_exit:
kobject_unregister(kernel_kobj);
kobject_put(kernel_kobj);
exit:
return error;
}
Expand Down
9 changes: 4 additions & 5 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,9 +1257,8 @@ int mod_sysfs_setup(struct module *mod,
out_unreg_param:
module_param_sysfs_remove(mod);
out_unreg_holders:
kobject_unregister(mod->holders_dir);
kobject_put(mod->holders_dir);
out_unreg:
kobject_del(&mod->mkobj.kobj);
kobject_put(&mod->mkobj.kobj);
return err;
}
Expand All @@ -1269,9 +1268,9 @@ static void mod_kobject_remove(struct module *mod)
{
module_remove_modinfo_attrs(mod);
module_param_sysfs_remove(mod);
kobject_unregister(mod->mkobj.drivers_dir);
kobject_unregister(mod->holders_dir);
kobject_unregister(&mod->mkobj.kobj);
kobject_put(mod->mkobj.drivers_dir);
kobject_put(mod->holders_dir);
kobject_put(&mod->mkobj.kobj);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions trunk/lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ struct kobject *kobject_create(void)
*
* This function creates a kset structure dynamically and registers it
* with sysfs. When you are finished with this structure, call
* kobject_unregister() and the structure will be dynamically freed when
* kobject_put() and the structure will be dynamically freed when
* it is no longer being used.
*
* If the kobject was not able to be created, NULL will be returned.
Expand Down Expand Up @@ -761,7 +761,7 @@ void kset_unregister(struct kset * k)
{
if (!k)
return;
kobject_unregister(&k->kobj);
kobject_put(&k->kobj);
}


Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void br_sysfs_delbr(struct net_device *dev)
struct kobject *kobj = &dev->dev.kobj;
struct net_bridge *br = netdev_priv(dev);

kobject_unregister(br->ifobj);
kobject_put(br->ifobj);
sysfs_remove_bin_file(kobj, &bridge_forward);
sysfs_remove_group(kobj, &bridge_group);
}
2 changes: 1 addition & 1 deletion trunk/security/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int __init securityfs_init(void)

retval = register_filesystem(&fs_type);
if (retval)
kobject_unregister(security_kobj);
kobject_put(security_kobj);
return retval;
}

Expand Down

0 comments on commit 10b70d1

Please sign in to comment.