Skip to content

Commit

Permalink
[PATCH] fs/eventpoll: error handling micro-cleanup
Browse files Browse the repository at this point in the history
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: Jeff Garzik <jeff@garzik.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jeff Garzik authored and Linus Torvalds committed Oct 3, 2006
1 parent e1ca66d commit c3b6571
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c3b6571

Please sign in to comment.