diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-02-07 14:49:46 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-02-18 22:47:55 +0300 |
commit | 96ebc0ca6f6d0978b1a016e6daa29817a812ce55 (patch) | |
tree | 38a4805ae58411537fb4beac6ea07fd0744855c2 /drivers | |
parent | dd8695e4e1e39136968339ceed5680327c174a31 (diff) | |
download | linux-96ebc0ca6f6d0978b1a016e6daa29817a812ce55.tar.xz |
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')
-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; } |