aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2007-04-26 03:12:09 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:34 -0400
commit240936e18b75937e7866934df723c2db0011d24f (patch)
tree0110cc4eecf98a3dec75e6a9d824907086591fe4 /kernel/module.c
parenta53c46dc8253cc613ad66a2ca7aad6de8b7e61b9 (diff)
mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs
mod_sysfs_setup() doesn't return an errno when kobject_add_dir() for module "holders" directory fails. So caller of mod_sysfs_setup() will keep going and get oops. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index dcdb32b8b13c..9da5af668a20 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1148,8 +1148,10 @@ int mod_sysfs_setup(struct module *mod,
1148 goto out; 1148 goto out;
1149 1149
1150 mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders"); 1150 mod->holders_dir = kobject_add_dir(&mod->mkobj.kobj, "holders");
1151 if (!mod->holders_dir) 1151 if (!mod->holders_dir) {
1152 err = -ENOMEM;
1152 goto out_unreg; 1153 goto out_unreg;
1154 }
1153 1155
1154 err = module_param_sysfs_setup(mod, kparam, num_params); 1156 err = module_param_sysfs_setup(mod, kparam, num_params);
1155 if (err) 1157 if (err)