mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
uio: Fix return value of poll
The return type of __poll_t can't be negative,
-EIO will be translate to __poll_t,and will return to caller.
Fixes: beafc54c4e ("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
54932d7254
commit
efc7ae3f24
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user