Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80875
b: refs/heads/master
c: 123ca95
h: refs/heads/master
i:
  80873: df7954b
  80871: f447eb4
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 27, 2008
1 parent bf33ff1 commit ce7b746
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 404aae5d420ec543e2e8434f7ec0edf5e2d2b0c4
refs/heads/master: 123ca9575b1f5342c05a4b84d6af8ba7587c2981
10 changes: 10 additions & 0 deletions trunk/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,13 +1214,23 @@ void module_remove_modinfo_attrs(struct module *mod)
int mod_sysfs_init(struct module *mod)
{
int err;
struct kobject *kobj;

if (!module_sysfs_initialized) {
printk(KERN_ERR "%s: module sysfs not initialized\n",
mod->name);
err = -EINVAL;
goto out;
}

kobj = kset_find_obj(module_kset, mod->name);
if (kobj) {
printk(KERN_ERR "%s: module is already loaded\n", mod->name);
kobject_put(kobj);
err = -EINVAL;
goto out;
}

mod->mkobj.mod = mod;

memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
Expand Down

0 comments on commit ce7b746

Please sign in to comment.