]> Git Repo - linux.git/commitdiff
media: sun6i-isp: params: Unregister pending buffer on cleanup
authorPaul Kocialkowski <[email protected]>
Thu, 8 Dec 2022 14:20:06 +0000 (15:20 +0100)
committerMauro Carvalho Chehab <[email protected]>
Wed, 14 Dec 2022 18:12:32 +0000 (18:12 +0000)
The state cleanup helper should unregister the pending buffer from
the state after returning it to v4l2, like it is done for other
buffers in the wait queue.

Before this change, the pending buffer from a previous run might have
been returned at the beginning of the next run, causing an error.

Signed-off-by: Paul Kocialkowski <[email protected]>
Fixes: e3185e1d7c14 ("media: staging: media: Add support for the Allwinner A31 ISP")
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c

index 7b41a13162b9ac4a0cb0a868d8b86d4c7d1f8df0..e28be895b48611bd8bd3c79548cc81792a52b588 100644 (file)
@@ -208,6 +208,8 @@ static void sun6i_isp_params_state_cleanup(struct sun6i_isp_device *isp_dev,
                vb2_buffer = &state->pending->v4l2_buffer.vb2_buf;
                vb2_buffer_done(vb2_buffer, error ? VB2_BUF_STATE_ERROR :
                                VB2_BUF_STATE_QUEUED);
+
+               state->pending = NULL;
        }
 
        list_for_each_entry(isp_buffer, &state->queue, list) {
This page took 0.064202 seconds and 4 git commands to generate.