Skip to content

Commit

Permalink
media: omap3isp: Fix missing unlock in isp_subdev_notifier_complete()
Browse files Browse the repository at this point in the history
[ Upstream commit 0368e7d ]

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

Fixes: ba689d9 ("media: omap3isp: Acquire graph mutex for graph traversal")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Wei Yongjun authored and gregkh committed Sep 15, 2021
1 parent 59dccf6 commit 99a7ac5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/platform/omap3isp/isp.c
Expand Up @@ -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)
Expand Down

0 comments on commit 99a7ac5

Please sign in to comment.