public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] posix clocks: correct error value in posix_clock_poll()
@ 2011-05-24 10:51 Nicolas Kaiser
  2011-05-24 12:34 ` Richard Cochran
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Kaiser @ 2011-05-24 10:51 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Richard Cochran, linux-kernel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-24 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 10:51 [PATCH] posix clocks: correct error value in posix_clock_poll() Nicolas Kaiser
2011-05-24 12:34 ` Richard Cochran
2011-05-24 14:08   ` Nicolas Kaiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox