[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240620145820.3910239-3-mstaudt@chromium.org>
Date: Thu, 20 Jun 2024 23:45:42 +0900
From: Max Staudt <mstaudt@...omium.org>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
Bingbu Cao <bingbu.cao@...el.com>,
Tianshu Qiu <tian.shu.qiu@...el.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ricardo Ribalda <ribalda@...omium.org>,
Max Staudt <mstaudt@...omium.org>
Subject: [PATCH v1 2/3] 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 <mstaudt@...omium.org>
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 ********************/
--
2.45.2.627.g7a2c4fd464-goog
Powered by blists - more mailing lists