aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-29 19:48:20 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-30 13:56:41 -0500
commita3f99f8ba8cbd2d4e231b767b3d6236a555da38c (patch)
tree9e70e751e1ec612e16ebeb7eb85a76450f59b5fe /kernel/module.c
parent96ceeaf4ab66315a5149296bb58d8e1a9e6f2f6d (diff)
[PATCH] module: fix mod_sysfs_setup() return value
mod_sysfs_setup() doesn't return error when kobject_add_dir() failed. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 b565eaeff7e..dbce132b354 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1132,8 +1132,10 @@ static int mod_sysfs_setup(struct module *mod,
1132 goto out; 1132 goto out;
1133 1133
1134 mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers"); 1134 mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers");
1135 if (!mod->drivers_dir) 1135 if (!mod->drivers_dir) {
1136 err = -ENOMEM;
1136 goto out_unreg; 1137 goto out_unreg;
1138 }
1137 1139
1138 err = module_param_sysfs_setup(mod, kparam, num_params); 1140 err = module_param_sysfs_setup(mod, kparam, num_params);
1139 if (err) 1141 if (err)