aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Staudt <[email protected]>2024-06-20 23:45:42 +0900
committerHans Verkuil <[email protected]>2024-08-31 09:40:42 +0200
commitcf27c5a1bd7cc0b8df26044b08be3488dec129f8 (patch)
treee77e474582d0b68c3a39383f811192b27ef9d9e2
parent1395ff433cde9074f11ea24f092368570b5a544e (diff)
staging: media: ipu3: Return buffers outside of needless locking
In imgu_vb2_start_streaming()'s error path, imgu_return_all_buffers() is outside the streaming_lock and after the call to video_device_pipeline_stop(). Let's apply the same order in imgu_vb2_stop_streaming() as well. Signed-off-by: Max Staudt <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
-rw-r--r--drivers/staging/media/ipu3/ipu3-v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
index 541556037c42..3ff390b04e1a 100644
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
@@ -556,10 +556,10 @@ static void imgu_vb2_stop_streaming(struct vb2_queue *vq)
imgu->streaming = false;
}
- imgu_return_all_buffers(imgu, node, VB2_BUF_STATE_ERROR);
mutex_unlock(&imgu->streaming_lock);
video_device_pipeline_stop(&node->vdev);
+ imgu_return_all_buffers(imgu, node, VB2_BUF_STATE_ERROR);
}
/******************** v4l2_ioctl_ops ********************/