diff options
author | 2019-02-07 06:49:46 -0500 | |
---|---|---|
committer | 2019-02-18 14:47:55 -0500 | |
commit | 96ebc0ca6f6d0978b1a016e6daa29817a812ce55 (patch) | |
tree | 38a4805ae58411537fb4beac6ea07fd0744855c2 /drivers/media/v4l2-core/v4l2-mem2mem.c | |
parent | media: v4l2-mem2mem: fix epoll() by calling poll_wait first (diff) | |
download | linux-96ebc0ca6f6d0978b1a016e6daa29817a812ce55.tar.gz linux-96ebc0ca6f6d0978b1a016e6daa29817a812ce55.tar.bz2 linux-96ebc0ca6f6d0978b1a016e6daa29817a812ce55.zip |
media: v4l2-mem2mem: add q->error check to v4l2_m2m_poll()
The v4l2_m2m_poll function didn't check whether q->error
was set for either of the two queues. Add support for this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-mem2mem.c')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-mem2mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 36ae6123dcef..57eccbaa52de 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -638,8 +638,10 @@ __poll_t v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, * means either in driver already or waiting for driver to claim it * and start processing. */ - if ((!src_q->streaming || list_empty(&src_q->queued_list)) - && (!dst_q->streaming || list_empty(&dst_q->queued_list))) { + if ((!src_q->streaming || src_q->error || + list_empty(&src_q->queued_list)) && + (!dst_q->streaming || dst_q->error || + list_empty(&dst_q->queued_list))) { rc |= EPOLLERR; goto end; } |