aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c
index b565eaeff7e6..dbce132b354c 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)