2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-04 11:24:04 +08:00

bfs: iget_locked() doesn't return an ERR_PTR

iget_locked() returns a NULL on error, it doesn't return an ERR_PTR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Dan Carpenter 2013-08-14 12:51:03 +03:00 committed by Al Viro
parent 136eefa48d
commit 821ff77c6c

View File

@ -40,7 +40,7 @@ struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
int block, off;
inode = iget_locked(sb, ino);
if (IS_ERR(inode))
if (!inode)
return ERR_PTR(-ENOMEM);
if (!(inode->i_state & I_NEW))
return inode;