befs: iget_locked() doesn't return an ERR_PTR

Also fix befs_iget return value if iget_locked fails.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Rakesh Pandit 2014-01-15 19:58:28 +02:00 committed by Al Viro
parent e6ff9a9fa4
commit ac34a1b35e

View File

@ -324,8 +324,8 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
befs_debug(sb, "---> befs_read_inode() " "inode = %lu", ino);
inode = iget_locked(sb, ino);
if (IS_ERR(inode))
return inode;
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW))
return inode;