diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-03-02 21:38:21 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-09-03 16:13:27 +0300 |
commit | 66aacfe22d53137eab511b3f4d674ddd40a7b1ac (patch) | |
tree | bb3a142be75d25c274af2673ae09da2afdb4fba6 /drivers/gpu/drm/omapdrm/dss/dsi.c | |
parent | a25edf0ea6de6780ef9e8dc489a5c14599c48326 (diff) |
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/dsi.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dsi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index ee260353b9ca..173c05a54550 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5360,7 +5360,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) r = dsi_runtime_get(dsi); if (r) - goto err_runtime_get; + goto err_pm_disable; rev = dsi_read_reg(dsi, DSI_REVISION); dev_dbg(dev, "OMAP DSI rev %d.%d\n", @@ -5381,7 +5381,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) r = dsi_probe_of(dsi); if (r) { DSSERR("Invalid DSI DT data\n"); - goto err_probe_of; + goto err_uninit_output; } r = of_platform_populate(dev->of_node, NULL, NULL, dev); @@ -5404,11 +5404,10 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) return 0; -err_probe_of: +err_uninit_output: dsi_uninit_output(dsi); dsi_runtime_put(dsi); - -err_runtime_get: +err_pm_disable: pm_runtime_disable(dev); return r; } |