diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-10-03 10:13:52 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 17:03:41 +0200 |
commit | c3b6571384024be31e8b3442c0e7c3b127110d9b (patch) | |
tree | 24281e244579d97eb944d7b48e0036f27db4fe3c /fs/eventpoll.c | |
parent | [PATCH] kernel-doc for kernel/resource.c (diff) | |
download | linux-c3b6571384024be31e8b3442c0e7c3b127110d9b.tar.xz linux-c3b6571384024be31e8b3442c0e7c3b127110d9b.zip |
[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: 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>
Diffstat (limited to 'fs/eventpoll.c')
-rw-r--r-- | fs/eventpoll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 8d544334bcd2..557d5b614fae 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -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(); |