public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] bfs: iget_locked() doesn't return an ERR_PTR
@ 2013-08-14  9:51 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-08-14  9:51 UTC (permalink / raw)
  To: Tigran A. Aivazian; +Cc: linux-kernel, kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 5e376bb..8defc6b 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -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;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-14  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14  9:51 [patch] bfs: iget_locked() doesn't return an ERR_PTR Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox