public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] efs: iget_locked() doesn't return an ERR_PTR()
@ 2013-08-14  9:49 Dan Carpenter
  2013-08-14 11:57 ` Serge E. Hallyn
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-08-14  9:49 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: Serge Hallyn, linux-kernel, kernel-janitors

The iget_locked() function returns NULL on error and never an ERR_PTR.

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

diff --git a/fs/efs/inode.c b/fs/efs/inode.c
index f3913eb..d15ccf2 100644
--- a/fs/efs/inode.c
+++ b/fs/efs/inode.c
@@ -57,7 +57,7 @@ struct inode *efs_iget(struct super_block *super, unsigned long ino)
 	struct inode *inode;
 
 	inode = iget_locked(super, 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] 2+ messages in thread

end of thread, other threads:[~2013-08-14 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14  9:49 [patch] efs: iget_locked() doesn't return an ERR_PTR() Dan Carpenter
2013-08-14 11:57 ` Serge E. Hallyn

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