[PATCH] media: omap3isp: drop the use count of v4l2 pipeline

Haoxiang Li posted 1 patch 2 weeks ago
drivers/media/platform/ti/omap3isp/ispvideo.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] media: omap3isp: drop the use count of v4l2 pipeline
Posted by Haoxiang Li 2 weeks ago
In isp_video_open(), drop the use count of v4l2
pipeline if vb2_queue_init() fails.

Fixes: 8fd390b89cc8 ("media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put}")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
---
 drivers/media/platform/ti/omap3isp/ispvideo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/ti/omap3isp/ispvideo.c b/drivers/media/platform/ti/omap3isp/ispvideo.c
index 0e7f0bf2b346..2d0061101a43 100644
--- a/drivers/media/platform/ti/omap3isp/ispvideo.c
+++ b/drivers/media/platform/ti/omap3isp/ispvideo.c
@@ -1324,6 +1324,7 @@ static int isp_video_open(struct file *file)
 
 	ret = vb2_queue_init(&handle->queue);
 	if (ret < 0) {
+		v4l2_pipeline_pm_put(&video->video.entity);
 		omap3isp_put(video->isp);
 		goto done;
 	}
-- 
2.25.1
Re: [PATCH] media: omap3isp: drop the use count of v4l2 pipeline
Posted by Markus Elfring 1 week, 6 days ago
> In isp_video_open(), drop the use count of v4l2
> pipeline if vb2_queue_init() fails.

* You may occasionally put more than 47 characters into text lines
  of such a change description.
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc7#n659

* Were any source code analysis tools involved here?


Regards,
Markus