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>
This commit is contained in:

committed by
Tomi Valkeinen

parent
a25edf0ea6
commit
66aacfe22d
@@ -745,15 +745,14 @@ int dpi_init_port(struct dss_device *dss, struct platform_device *pdev,
|
||||
return 0;
|
||||
|
||||
r = of_property_read_u32(ep, "data-lines", &datalines);
|
||||
of_node_put(ep);
|
||||
if (r) {
|
||||
DSSERR("failed to parse datalines\n");
|
||||
goto err_datalines;
|
||||
return r;
|
||||
}
|
||||
|
||||
dpi->data_lines = datalines;
|
||||
|
||||
of_node_put(ep);
|
||||
|
||||
dpi->pdev = pdev;
|
||||
dpi->dss_model = dss_model;
|
||||
dpi->dss = dss;
|
||||
@@ -764,11 +763,6 @@ int dpi_init_port(struct dss_device *dss, struct platform_device *pdev,
|
||||
dpi_init_output_port(dpi, port);
|
||||
|
||||
return 0;
|
||||
|
||||
err_datalines:
|
||||
of_node_put(ep);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void dpi_uninit_port(struct device_node *port)
|
||||
|
Reference in New Issue
Block a user