diff mbox series

[1/3] media: coda: jpeg: set buffer error flag when header parsing fails

Message ID 20220406085353.2369313-1-p.zabel@pengutronix.de
State Accepted
Commit d2cc715a56df87a9422740d2d62fbf8f5ea4a33b
Headers show
Series [1/3] media: coda: jpeg: set buffer error flag when header parsing fails | expand

Commit Message

Philipp Zabel April 6, 2022, 8:53 a.m. UTC
If decoding fails because  the output buffer does not contain a
valid header, set the error flag on the returned capture buffer.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/media/platform/chips-media/coda-jpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/media/platform/chips-media/coda-jpeg.c b/drivers/media/platform/chips-media/coda-jpeg.c
index a72f4655e5ad..9e3e05434b96 100644
--- a/drivers/media/platform/chips-media/coda-jpeg.c
+++ b/drivers/media/platform/chips-media/coda-jpeg.c
@@ -1353,7 +1353,7 @@  static int coda9_jpeg_prepare_decode(struct coda_ctx *ctx)
 		src_buf = v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
 		dst_buf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
 		v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_DONE);
-		v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_DONE);
+		v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_ERROR);
 
 		v4l2_m2m_job_finish(ctx->dev->m2m_dev, ctx->fh.m2m_ctx);
 		return ret;