Commit:     d58ae67813ff97030d2f47ff7d1e5f54e5d7c5b3
Parent:     22d2b35b200f76085c16a2e14ca30b58510fcbe7
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:27 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:01 2007 -0700

    module: return error when mod_sysfs_init() failed
    load_module() returns zero when mod_sysfs_init() fails, then the module
    loading will succeed accidentally.
    This patch makes load_module() return error correctly in that case.
    Acked-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
    Acked-by: Rusty Russell <[EMAIL PROTECTED]>
    Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/module.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index c24c3c3..a389b42 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1881,7 +1881,8 @@ static struct module *load_module(void __user *umod,
        /* Initialize kobject, so we can reference it. */
-       if (mod_sysfs_init(mod) != 0)
+       err = mod_sysfs_init(mod);
+       if (err)
                goto cleanup;
        /* Set up license info based on the info section */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to