Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2af12f02 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 4e65172f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);