Commit a3f99f8b authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] module: fix mod_sysfs_setup() return value

mod_sysfs_setup() doesn't return error when kobject_add_dir() failed.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 96ceeaf4
...@@ -1132,8 +1132,10 @@ static int mod_sysfs_setup(struct module *mod, ...@@ -1132,8 +1132,10 @@ static int mod_sysfs_setup(struct module *mod,
goto out; goto out;
mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers"); mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers");
if (!mod->drivers_dir) if (!mod->drivers_dir) {
err = -ENOMEM;
goto out_unreg; goto out_unreg;
}
err = module_param_sysfs_setup(mod, kparam, num_params); err = module_param_sysfs_setup(mod, kparam, num_params);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment