提交 099a71d9 编写于 作者: E Eric Sesterhenn 提交者: Linus Torvalds

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

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: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NEric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@lanl.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 18cddac3
......@@ -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;
}
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册