media: v4l2-mem2mem: simplify poll logic
authorAlexandre Courbot <gnurou@gmail.com>
Thu, 27 Aug 2020 12:49:46 +0000 (14:49 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:18:09 +0000 (10:18 +0200)
commit1698a7f1511267a0d07a783dd467eab19bf498f3
treec627fab53d5147922a08c0887f0741355f54bf1c
parent566463afdbc43c7744c5a1b89250fc808df03833
media: v4l2-mem2mem: simplify poll logic

Factorize redundant checks into a single code block, remove unneeded
checks (a buffer in done_list is necessarily in the DONE or ERROR
state), and we end up with a much simpler version of this function.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-mem2mem.c