patch-2.4.0-test3 linux/kernel/module.c
Next file: linux/kernel/printk.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
Mon Jun 26 12:11:10 2000
- Orig file:
v2.4.0-test2/linux/kernel/module.c
- Orig date:
Fri Jun 23 21:55:23 2000
diff -u --recursive --new-file v2.4.0-test2/linux/kernel/module.c linux/kernel/module.c
@@ -326,10 +326,11 @@
/* Initialize the module. */
mod->flags |= MOD_INITIALIZING;
atomic_set(&mod->uc.usecount,1);
- if (mod->init && mod->init() != 0) {
+ if (mod->init && (error = mod->init()) != 0) {
atomic_set(&mod->uc.usecount,0);
mod->flags &= ~MOD_INITIALIZING;
- error = -EBUSY;
+ if (error > 0) /* Buggy module */
+ error = -EBUSY;
goto err0;
}
atomic_dec(&mod->uc.usecount);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)