Skip to content

Commit

Permalink
media: sun6i-isp: params: Unregister pending buffer on cleanup
Browse files Browse the repository at this point in the history
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 <paul.kocialkowski@bootlin.com>
Fixes: e3185e1 ("media: staging: media: Add support for the Allwinner A31 ISP")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
  • Loading branch information
Paul Kocialkowski authored and Mauro Carvalho Chehab committed Dec 14, 2022
1 parent 94c3435 commit 542d3c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 542d3c0

Please sign in to comment.