Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3f99f8ba8cbd2d4e231b767b3d6236a555da38c
Commit:     a3f99f8ba8cbd2d4e231b767b3d6236a555da38c
Parent:     96ceeaf4ab66315a5149296bb58d8e1a9e6f2f6d
Author:     Akinobu Mita <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 29 16:48:20 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Dec 30 10:56:41 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Cc: Greg KH <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/module.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index b565eae..dbce132 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1132,8 +1132,10 @@ static int mod_sysfs_setup(struct module *mod,
                goto out;
 
        mod->drivers_dir = kobject_add_dir(&mod->mkobj.kobj, "drivers");
-       if (!mod->drivers_dir)
+       if (!mod->drivers_dir) {
+               err = -ENOMEM;
                goto out_unreg;
+       }
 
        err = module_param_sysfs_setup(mod, kparam, num_params);
        if (err)
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to