Message ID | 20220406085353.2369313-1-p.zabel@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] media: coda: jpeg: set buffer error flag when header parsing fails | expand |
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;
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(-)