Skip to content

Commit

Permalink
uio: Fix return value of poll
Browse files Browse the repository at this point in the history
The return type of __poll_t can't be negative,
-EIO will be translate to __poll_t,and will return to caller.

Fixes: beafc54 ("UIO: Add the User IO core code")
Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
Link: https://lore.kernel.org/r/20241126124259.1367-1-angus.chen@jaguarmicro.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Angus Chen authored and Greg Kroah-Hartman committed Jan 10, 2025
1 parent 54932d7 commit efc7ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ static __poll_t uio_poll(struct file *filep, poll_table *wait)

mutex_lock(&idev->info_lock);
if (!idev->info || !idev->info->irq)
ret = -EIO;
ret = EPOLLERR;
mutex_unlock(&idev->info_lock);

if (ret)
Expand Down

0 comments on commit efc7ae3

Please sign in to comment.