[media] media: davinci_vpfe: fix missing unlock on error in vpfe_prepare_pipeline()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 5 Feb 2016 13:52:00 +0000 (11:52 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 10 Feb 2016 11:27:09 +0000 (09:27 -0200)
Add the missing unlock before return from function
vpfe_prepare_pipeline() in the error handling case.

video->lock is lock/unlock in function vpfe_open(),
and no need to unlock it here, so remove unlock
video->lock.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/davinci_vpfe/vpfe_video.c

index 3ec7e65a3ffa524efb6e95d98bbc6916592d2a18..db49af90217e3f62cc6f8e3dcf1ec713a732abb2 100644 (file)
@@ -147,7 +147,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video)
        mutex_lock(&mdev->graph_mutex);
        ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev);
        if (ret) {
-               mutex_unlock(&video->lock);
+               mutex_unlock(&mdev->graph_mutex);
                return -ENOMEM;
        }
        media_entity_graph_walk_start(&graph, entity);