binderfs: fix error return code in binderfs_fill_super()

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: 849d540ddf ("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>
This commit is contained in:
Wei Yongjun 2019-01-16 10:42:59 +00:00 committed by Greg Kroah-Hartman
parent f7ee8ead15
commit 7e7ca7744a
1 changed files with 1 additions and 0 deletions

View 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;