]> git.baikalelectronics.ru Git - kernel.git/commit
media: coda: consolidate job_finish calls on decoder prepare_run failure
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 5 Apr 2022 13:55:17 +0000 (14:55 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 24 Apr 2022 07:45:03 +0000 (08:45 +0100)
commita60c5797527df8d4399fde4153f16959194f66ec
treefbb20bd0f28b9ef5b93ed153ce4fc1b59c3c56b3
parentbde73ffba1e38f5bc55cb04bba347570cc973c46
media: coda: consolidate job_finish calls on decoder prepare_run failure

If the decoder prepare_run callback returns an error, the hardware
is never started and v4l2_m2m_job_finish() is called immediately,
currently in every error path.

Remove the duplicated job_finish calls from the error paths and reuse
the v4l2_m2m_job_finish() at the end of coda_pic_run_work instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/chips-media/coda-bit.c
drivers/media/platform/chips-media/coda-common.c
drivers/media/platform/chips-media/coda-jpeg.c