Commit 96ebc0ca authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent dd8695e4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
	}