Skip to contentSkip to conversation

media: omap3isp: add missing unlock on error in isp_subdev_notifier_complete()

PATCH In review Yang Yingliang 2 participants 2 messages May 12, 2021 – Jun 23, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: omap3isp: add missing unlock on error in isp_subdev_notifier_complete()

Add the missing unlock before return from isp_subdev_notifier_complete() in the error handling case.

Fixes ba689d933361 ("media: omap3isp: Acquire graph mutex for graph traversal")
---
 drivers/media/platform/omap3isp/isp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/platform/omap3isp/isp.c +3 -1
index 53025c8c7531..20f59c59ff8a 100644
@@ -2037,8 +2037,10 @@ static int isp_subdev_notifier_complete(struct v4l2_async_notifier *async)
 	mutex_lock(&isp->media_dev.graph_mutex);
 
 	ret = media_entity_enum_init(&isp->crashed, &isp->media_dev);
-	if (ret)
+	if (ret) {
+		mutex_unlock(&isp->media_dev.graph_mutex);
 		return ret;
+	}
 
 	list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
 		if (sd->notifier != &isp->notifier)
Signature · 1 line
2.25.1
#1 lore raw

Hi Yang,

Quoted 6 lines · Yang Yingliang

Add the missing unlock before return from isp_subdev_notifier_complete() in the error handling case.

Fixes ba689d933361 ("media: omap3isp: Acquire graph mutex for graph traversal")

Thanks for the patch. This is already fixed by another patch, accidentally left sitting in my tree... It'll be in the next pull request.

<URL:https://patchwork.linuxtv.org/project/linux-media/patch/[email protected]/>

Signature · 1 line
Sakari Ailus