Skip to contentSkip to conversation

Remove needless checks in fs/9p/vfs_inode.c

PATCH New Eric Sesterhenn 1 participant 1 message Jun 13, 2006 9P file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove needless checks in fs/9p/vfs_inode.c

hi,

coverity found two needless checks in vfs_inode.c (cid #1165 and #1164) In both cases inode is always NULL when we goto error; either because it is still initialized to NULL or is set to NULL explicitly. This patch simply removes these checks to save some code.

fs/9p/vfs_inode.c renamed from fs/9p/vfs_inode.c.orig +0 -6
@@ -530,9 +530,6 @@ error:
 	if (vfid)
 		v9fs_fid_destroy(vfid);
 
-	if (inode)
-		iput(inode);
-
 	return err;
 }
 
@@ -1171,9 +1168,6 @@ error:
 	if (vfid)
 		v9fs_fid_destroy(vfid);
 
-	if (inode)
-		iput(inode);
-
 	return err;
 
 }