aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-16 13:33:59 +0100
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-06-02 12:00:04 +0200
commitb6b6167f1cf49eb803b11f42485273f73a882258 (patch)
tree18c68c1d5f59aa5c578727ed284f02076f06e6a1
parent3b6471c7becd06325eb5e701cc2602b2edbbc7b6 (diff)
hdpvr: fix epoll
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--drivers/media/usb/hdpvr/hdpvr-video.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
index 3804aa3fb50f..4739e5417aa3 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -546,12 +546,11 @@ static __poll_t hdpvr_poll(struct file *filp, poll_table *wait)
}
mutex_unlock(&dev->io_mutex);
+ poll_wait(filp, &dev->wait_data, wait);
buf = hdpvr_get_next_buffer(dev);
/* only wait if no data is available */
- if (!buf || buf->status != BUFSTAT_READY) {
- poll_wait(filp, &dev->wait_data, wait);
+ if (!buf || buf->status != BUFSTAT_READY)
buf = hdpvr_get_next_buffer(dev);
- }
if (buf && buf->status == BUFSTAT_READY)
mask |= EPOLLIN | EPOLLRDNORM;

Privacy Policy