提交 c3b65713 编写于 作者: J Jeff Garzik 提交者: Linus Torvalds

[PATCH] fs/eventpoll: error handling micro-cleanup

While reviewing the 'may be used uninitialized' bogus gcc warnings, I
noticed that an error code assignment was only needed if an error had
actually occured.
Signed-off-by: NJeff Garzik <jeff@garzik.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 e1ca66d1
......@@ -720,9 +720,10 @@ static int ep_getfd(int *efd, struct inode **einode, struct file **efile,
/* Allocates an inode from the eventpoll file system */
inode = ep_eventpoll_inode();
error = PTR_ERR(inode);
if (IS_ERR(inode))
if (IS_ERR(inode)) {
error = PTR_ERR(inode);
goto eexit_2;
}
/* Allocates a free descriptor to plug the file onto */
error = get_unused_fd();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册