linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: event: Remove negative error code from iio_event_poll
@ 2015-08-03 10:00 Cristina Opriceana
  2015-08-08 16:20 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Cristina Opriceana @ 2015-08-03 10:00 UTC (permalink / raw)
  To: jic23; +Cc: knaack.h, lars, pmeerw, linux-iio, linux-kernel, daniel.baluta

Negative return values are not supported by iio_event_poll since
its return type is unsigned int.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
---
 drivers/iio/industrialio-event.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index b2f63f9..eb44dab 100644
--- a/drivers/iio/industrialio-event.c
+++ b/drivers/iio/industrialio-event.c
@@ -80,7 +80,7 @@ EXPORT_SYMBOL(iio_push_event);
  * @wait:	Poll table pointer to add the wait queue on
  *
  * Return: (POLLIN | POLLRDNORM) if data is available for reading
- *	   or a negative error code on failure
+ *	   or 0 on failure
  */
 static unsigned int iio_event_poll(struct file *filep,
 			     struct poll_table_struct *wait)
@@ -90,7 +90,7 @@ static unsigned int iio_event_poll(struct file *filep,
 	unsigned int events = 0;
 
 	if (!indio_dev->info)
-		return -ENODEV;
+		return events;
 
 	poll_wait(filep, &ev_int->wait, wait);
 
-- 
1.9.1


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

end of thread, other threads:[~2015-08-08 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-03 10:00 [PATCH] iio: event: Remove negative error code from iio_event_poll Cristina Opriceana
2015-08-08 16:20 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).