Skip to content

Commit

Permalink
[PATCH] Remove needless checks in fs/9p/vfs_inode.c
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@lanl.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric Sesterhenn authored and Linus Torvalds committed Jun 25, 2006
1 parent 18cddac commit 099a71d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,6 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
if (vfid)
v9fs_fid_destroy(vfid);

if (inode)
iput(inode);

return err;
}

Expand Down Expand Up @@ -1174,9 +1171,6 @@ static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry,
if (vfid)
v9fs_fid_destroy(vfid);

if (inode)
iput(inode);

return err;

}
Expand Down

0 comments on commit 099a71d

Please sign in to comment.