]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
binderfs: fix error return code in binderfs_fill_super()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 16 Jan 2019 10:42:59 +0000 (10:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2019 13:14:14 +0000 (14:14 +0100)
Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.

Fixes: 849d540ddfcd ("binderfs: implement "max" mount option")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binderfs.c

index 9518e2e7da05dfa4b526db52f80137d45ca69962..e4ff4c3fa371c69a2ca88860bfe26e95f9e72770 100644 (file)
@@ -518,6 +518,7 @@ static int binderfs_fill_super(struct super_block *sb, void *data, int silent)
 
        sb->s_fs_info = info;
 
+       ret = -ENOMEM;
        inode = new_inode(sb);
        if (!inode)
                goto err_without_dentry;