Skip to contentSkip to conversation

uio: Fix return value of poll

PATCH New Angus Chen 1 participant 1 message Nov 26, 2024 Userspace I/O (UIO)

lore
Share & tools
lore

Angus Chen

author
#0 lore raw

PATCH 1/1 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")
---
 drivers/uio/uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/uio/uio.c +1 -1
index 004a549c6c7d..d93ed4e86a17 100644
@@ -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)
Signature · 1 line
2.34.1