Skip to content

Commit 542d3c0

Browse files
paulkocialkowskimchehab
authored andcommitted
media: sun6i-isp: params: Unregister pending buffer on cleanup
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: e3185e1 ("media: staging: media: Add support for the Allwinner A31 ISP") Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 94c3435 commit 542d3c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ static void sun6i_isp_params_state_cleanup(struct sun6i_isp_device *isp_dev,
208208
vb2_buffer = &state->pending->v4l2_buffer.vb2_buf;
209209
vb2_buffer_done(vb2_buffer, error ? VB2_BUF_STATE_ERROR :
210210
VB2_BUF_STATE_QUEUED);
211+
212+
state->pending = NULL;
211213
}
212214

213215
list_for_each_entry(isp_buffer, &state->queue, list) {

0 commit comments

Comments
 (0)