diff --git a/drivers/media/platform/imx8/mxc-jpeg.c b/drivers/media/platform/imx8/mxc-jpeg.c
index dfc04999cb5ec7c7182df32de73996386651877f..58ac99c86d5f7861c416d828dbe9e8b7c3566a2f 100644
--- a/drivers/media/platform/imx8/mxc-jpeg.c
+++ b/drivers/media/platform/imx8/mxc-jpeg.c
@@ -498,7 +498,9 @@ buffers_done:
 	v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
 	v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), buf_state);
 	v4l2_m2m_buf_done(to_vb2_v4l2_buffer(dst_buf), buf_state);
+	spin_unlock(&jpeg->hw_lock);
 	v4l2_m2m_job_finish(jpeg->m2m_dev, ctx->fh.m2m_ctx);
+	return IRQ_HANDLED;
 job_unlock:
 	spin_unlock(&jpeg->hw_lock);
 	return IRQ_HANDLED;