lkml.org 
[lkml]   [2015]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 04/20] staging/lustre/obdclass: fix class_procfs_init error return value
    Date
    From: Oleg Drokin <green@linuxhacker.ru>

    Dan Carpenter noticed that procfs conversion patches introduced
    a bug where should kobject_create_and_add, an error is not returned
    from class_procfs_init.

    Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
    ---
    drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
    index 84f75dc..b618c0b 100644
    --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
    +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
    @@ -423,7 +423,7 @@ static struct attribute_group lustre_attr_group = {

    int class_procfs_init(void)
    {
    - int rc = 0;
    + int rc = -ENOMEM;
    struct dentry *file;

    lustre_kobj = kobject_create_and_add("lustre", fs_kobj);
    --
    2.1.0


    \
     
     \ /
      Last update: 2015-07-06 19:21    [W:5.017 / U:0.600 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site