From: Jeff Garzik <jeff@garzik.org>
To: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Cc: davidel@xmailserver.org
Subject: [PATCH] fs/eventpoll: error handling micro-cleanup
Date: Sun, 1 Oct 2006 08:43:52 -0400 [thread overview]
Message-ID: <20061001124352.GA30263@havoc.gtf.org> (raw)
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>
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 8d54433..557d5b6 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -720,9 +720,10 @@ static int ep_getfd(int *efd, struct ino
/* 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();
next reply other threads:[~2006-10-01 12:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-01 12:43 Jeff Garzik [this message]
2006-10-01 16:04 ` [PATCH] fs/eventpoll: error handling micro-cleanup Davide Libenzi
2006-10-01 16:08 ` Jeff Garzik
2006-10-01 16:19 ` Davide Libenzi
2006-10-01 16:30 ` Jeff Garzik
2006-10-01 16:41 ` Davide Libenzi
2006-10-01 17:28 ` Jeff Garzik
2006-10-01 18:58 ` Davide Libenzi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061001124352.GA30263@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=akpm@osdl.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox