]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/hid/hidraw.c
HID: hidraw: Fix returning EPOLLOUT from hidraw_poll
[mirror_ubuntu-bionic-kernel.git] / drivers / hid / hidraw.c
index 1ac82e194818d5c3a4b7c48fec43299cdac1dc4f..1abf5008def0b1f8b3b1c5e6c3061f404cf6e8de 100644 (file)
@@ -260,10 +260,10 @@ static unsigned int hidraw_poll(struct file *file, poll_table *wait)
 
        poll_wait(file, &list->hidraw->wait, wait);
        if (list->head != list->tail)
-               return POLLIN | POLLRDNORM | POLLOUT;
+               return POLLIN | POLLRDNORM;
        if (!list->hidraw->exist)
                return POLLERR | POLLHUP;
-       return 0;
+       return POLLOUT | POLLWRNORM;
 }
 
 static int hidraw_open(struct inode *inode, struct file *file)