summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/hdmi5.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-02 22:38:21 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:27 +0300
commit66aacfe22d53137eab511b3f4d674ddd40a7b1ac (patch)
treebb3a142be75d25c274af2673ae09da2afdb4fba6 /drivers/gpu/drm/omapdrm/dss/hdmi5.c
parenta25edf0ea6de6780ef9e8dc489a5c14599c48326 (diff)
downloadlinux-66aacfe22d53137eab511b3f4d674ddd40a7b1ac.tar.xz
drm/omap: dss: Cleanup error paths in output init functions
Rename the jump labels according to the cleanup they perform, not the location they're accessed from, and move functions from error checks to cleanup paths, and move reference handling to simplify cleanup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/hdmi5.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
index e5d23dd19f99..92ae561bf974 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
@@ -773,9 +773,7 @@ static int hdmi5_bind(struct device *dev, struct device *master, void *data)
r = hdmi_audio_register(hdmi);
if (r) {
DSSERR("Registering HDMI audio failed %d\n", r);
- hdmi_uninit_output(hdmi);
- pm_runtime_disable(&pdev->dev);
- return r;
+ goto err_uninit_output;
}
hdmi->debugfs = dss_debugfs_create_file(dss, "hdmi", hdmi_dump_regs,
@@ -783,6 +781,9 @@ static int hdmi5_bind(struct device *dev, struct device *master, void *data)
return 0;
+err_uninit_output:
+ hdmi_uninit_output(hdmi);
+ pm_runtime_disable(&pdev->dev);
err_pll:
hdmi_pll_uninit(&hdmi->pll);
err_free: