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)
commit375acc17b108916de7357a6fad42e8bff61cd47d
treefbb20bd0f28b9ef5b93ed153ce4fc1b59c3c56b3
parent87e0ce68cc0216063c6329aca0c31961a33a5372
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