Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d21f37e authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Greg Kroah-Hartman
Browse files

HID: uhid: Fix returning EPOLLOUT from uhid_char_poll



commit be54e7461ffdc5809b67d2aeefc1ddc9a91470c7 upstream.

Always return EPOLLOUT from uhid_char_poll to allow polling /dev/uhid
for writable state.

Fixes: 1f9dec1e ("HID: uhid: allow poll()'ing on uhid devices")
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31d06cc8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -775,7 +775,7 @@ static __poll_t uhid_char_poll(struct file *file, poll_table *wait)
	if (uhid->head != uhid->tail)
	if (uhid->head != uhid->tail)
		return EPOLLIN | EPOLLRDNORM;
		return EPOLLIN | EPOLLRDNORM;


	return 0;
	return EPOLLOUT | EPOLLWRNORM;
}
}


static const struct file_operations uhid_fops = {
static const struct file_operations uhid_fops = {