summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2022-12-08 17:20:06 +0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2022-12-12 13:36:01 +0300
commitd4acfa22b634347be33d5906744366742fccd151 (patch)
tree8c41a1b754bf79856f4d62ca15a017cdad39de65
parent10413ad08d574e676c67fa6447f7ff70082a4cdc (diff)
downloadlinux-d4acfa22b634347be33d5906744366742fccd151.tar.xz
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 <paul.kocialkowski@bootlin.com> Fixes: e3185e1d7c14 ("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>
-rw-r--r--drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
index 7b41a13162b9..e28be895b486 100644
--- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
+++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
@@ -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) {