From: Rakesh Pandit Date: Wed, 15 Jan 2014 17:58:28 +0000 (+0200) Subject: befs: iget_locked() doesn't return an ERR_PTR X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac34a1b35eca5ef64cb499e25f776bf42a81a660;p=linux-beck.git befs: iget_locked() doesn't return an ERR_PTR Also fix befs_iget return value if iget_locked fails. Signed-off-by: Rakesh Pandit Signed-off-by: Al Viro --- diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index daa15d6ba450..845d2d690ce2 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -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;