summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-03-09 03:39:33 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 18:36:33 -0300
commit2af12f025870f664244defab14796da2fdb5009e (patch)
tree811546aa268c44c092ff45eeca0736e4fe2cfd0f
parent4e65172f7bd20fcbfa87453d1e5711ad129d4216 (diff)
downloadop-kernel-dev-2af12f025870f664244defab14796da2fdb5009e.zip
op-kernel-dev-2af12f025870f664244defab14796da2fdb5009e.tar.gz
[media] soc-camera: Unregister v4l2 clock in the OF bind error path
The v4l2 clock registered in soc_of_bind() must be unregistered if an error occurs and makes the function fail. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/platform/soc_camera/soc_camera.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index b26d4d4..2a400d4 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1661,6 +1661,8 @@ static int soc_of_bind(struct soc_camera_host *ici,
ret = v4l2_async_notifier_register(&ici->v4l2_dev, &sasc->notifier);
if (!ret)
return 0;
+
+ v4l2_clk_unregister(icd->clk);
eclkreg:
icd->clk = NULL;
platform_device_del(sasc->pdev);
OpenPOWER on IntegriCloud