Commit 8023651b authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: dss: Handle DPI and SDI port initialization failures

The dpi_init_port() and sdi_init_port() functions can return errors but
their return value is ignored. This prevents both probe failures and
probe deferral from working correctly. Propagate the errors up the call
stack.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent cc1876ce
...@@ -1183,7 +1183,8 @@ static int dss_init_ports(struct dss_device *dss) ...@@ -1183,7 +1183,8 @@ static int dss_init_ports(struct dss_device *dss)
struct platform_device *pdev = dss->pdev; struct platform_device *pdev = dss->pdev;
struct device_node *parent = pdev->dev.of_node; struct device_node *parent = pdev->dev.of_node;
struct device_node *port; struct device_node *port;
int i; unsigned int i;
int r;
for (i = 0; i < dss->feat->num_ports; i++) { for (i = 0; i < dss->feat->num_ports; i++) {
port = of_graph_get_port_by_id(parent, i); port = of_graph_get_port_by_id(parent, i);
...@@ -1192,11 +1193,17 @@ static int dss_init_ports(struct dss_device *dss) ...@@ -1192,11 +1193,17 @@ static int dss_init_ports(struct dss_device *dss)
switch (dss->feat->ports[i]) { switch (dss->feat->ports[i]) {
case OMAP_DISPLAY_TYPE_DPI: case OMAP_DISPLAY_TYPE_DPI:
dpi_init_port(dss, pdev, port, dss->feat->model); r = dpi_init_port(dss, pdev, port, dss->feat->model);
if (r)
return r;
break; break;
case OMAP_DISPLAY_TYPE_SDI: case OMAP_DISPLAY_TYPE_SDI:
sdi_init_port(dss, pdev, port); r = sdi_init_port(dss, pdev, port);
if (r)
return r;
break; break;
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment