diff options
author | Flavio Ceolin <flavio.ceolin@intel.com> | 2017-12-06 11:38:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-18 14:57:45 -0500 |
commit | 9392483122e8818c0bf38e82ccf01b71e0c2151e (patch) | |
tree | 8ea48bcf679385cb7558ff4c3ba3e280fe51eb8c /drivers | |
parent | 866a6eccdd998418065ff28fd280252bfa63e43c (diff) |
media: pxa_camera: disable and unprepare the clock source on error
pxa_camera_probe() was not calling pxa_camera_deactivate(),
responsible to call clk_disable_unprepare(), on the failure path. This
was leading to unbalancing source clock.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/pxa_camera.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index 305cf1cac210..d68407303043 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -2491,7 +2491,7 @@ static int pxa_camera_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, pcdev); err = v4l2_device_register(&pdev->dev, &pcdev->v4l2_dev); if (err) - goto exit_free_dma; + goto exit_deactivate; pcdev->asds[0] = &pcdev->asd; pcdev->notifier.subdevs = pcdev->asds; @@ -2527,6 +2527,8 @@ exit_free_clk: v4l2_clk_unregister(pcdev->mclk_clk); exit_free_v4l2dev: v4l2_device_unregister(&pcdev->v4l2_dev); +exit_deactivate: + pxa_camera_deactivate(pcdev); exit_free_dma: dma_release_channel(pcdev->dma_chans[2]); exit_free_dma_u: |