diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-08-21 23:22:54 -0300 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2016-09-05 12:32:55 -0700 |
commit | e0dc7c837dd0f514abce47101c04ce0ce243188e (patch) | |
tree | 4a5d57cb6f404adbd72e61e6792f641eb2881755 /drivers/gpu/drm/fsl-dcu | |
parent | acd4d615bc5b4035a542ea3458fdee3b5d6f0f78 (diff) | |
download | blackbird-op-linux-e0dc7c837dd0f514abce47101c04ce0ce243188e.tar.gz blackbird-op-linux-e0dc7c837dd0f514abce47101c04ce0ce243188e.zip |
drm/fsl-dcu: disable clock on error path
In fsl_dcu_drm_pm_resume() we should disable the previously enabled
clock (fsl_dev->clk) when enabling fsl_dev->pix_clk fails.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Diffstat (limited to 'drivers/gpu/drm/fsl-dcu')
-rw-r--r-- | drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index 5fc8ebdf40b2..092aaecc7482 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c @@ -270,7 +270,7 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) ret = clk_prepare_enable(fsl_dev->pix_clk); if (ret < 0) { dev_err(dev, "failed to enable pix clk\n"); - return ret; + goto disable_dcu_clk; } fsl_dcu_drm_init_planes(fsl_dev->drm); @@ -284,6 +284,10 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) enable_irq(fsl_dev->irq); return 0; + +disable_dcu_clk: + clk_disable_unprepare(fsl_dev->clk); + return ret; } #endif |