diff options
| author | Angus Chen <angus.chen@jaguarmicro.com> | 2024-11-26 20:42:58 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-10 09:52:39 +0100 |
| commit | efc7ae3f249a6aa2de8f6bec56a2314badfd340a (patch) | |
| tree | 28dd3a3b01373ead73a2ca4349bcd66f6efc062e /drivers/uio | |
| parent | 54932d72544dc38d6771597523cca78b1729a442 (diff) | |
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: beafc54c4e2f ("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>
Diffstat (limited to 'drivers/uio')
| -rw-r--r-- | drivers/uio/uio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 004a549c6c7d..d93ed4e86a17 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -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) |
