Skip to content

Commit 41d903c

Browse files
cristina2689jic23
authored andcommitted
iio: event: Remove negative error code from iio_event_poll
Negative return values are not supported by iio_event_poll since its return type is unsigned int. Fixes: f18e7a0 ("iio: Return -ENODEV for file operations if the device has been unregistered") Signed-off-by: Cristina Opriceana <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 1bdc029 commit 41d903c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/industrialio-event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static unsigned int iio_event_poll(struct file *filep,
9090
unsigned int events = 0;
9191

9292
if (!indio_dev->info)
93-
return -ENODEV;
93+
return events;
9494

9595
poll_wait(filep, &ev_int->wait, wait);
9696

0 commit comments

Comments
 (0)