From: Nicolas Kaiser <nikai@nikai.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Cochran <richard.cochran@omicron.at>,
linux-kernel@vger.kernel.org
Subject: [PATCH] posix clocks: correct error value in posix_clock_poll()
Date: Tue, 24 May 2011 12:51:47 +0200 [thread overview]
Message-ID: <20110524125147.0eb112b5@absol.kitzblitz> (raw)
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
It looks to me like -ENODEV might not be a good return value
in poll(). Would POLLERR be the correct one in this case?
kernel/time/posix-clock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c
index c340ca6..2424d3f 100644
--- a/kernel/time/posix-clock.c
+++ b/kernel/time/posix-clock.c
@@ -71,7 +71,7 @@ static unsigned int posix_clock_poll(struct file *fp, poll_table *wait)
int result = 0;
if (!clk)
- return -ENODEV;
+ return POLLERR;
if (clk->ops.poll)
result = clk->ops.poll(clk, fp, wait);
--
1.7.5.rc3
next reply other threads:[~2011-05-24 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 10:51 Nicolas Kaiser [this message]
2011-05-24 12:34 ` [PATCH] posix clocks: correct error value in posix_clock_poll() Richard Cochran
2011-05-24 14:08 ` Nicolas Kaiser
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=20110524125147.0eb112b5@absol.kitzblitz \
--to=nikai@nikai.net \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.cochran@omicron.at \
--cc=tglx@linutronix.de \
/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