|
@@ -941,11 +941,13 @@ static int dss_init_features(struct platform_device *pdev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void dss_uninit_ports(struct platform_device *pdev);
|
|
|
+
|
|
|
static int dss_init_ports(struct platform_device *pdev)
|
|
|
{
|
|
|
struct device_node *parent = pdev->dev.of_node;
|
|
|
struct device_node *port;
|
|
|
- int r;
|
|
|
+ int r, ret = 0;
|
|
|
|
|
|
if (parent == NULL)
|
|
|
return 0;
|
|
@@ -972,17 +974,21 @@ static int dss_init_ports(struct platform_device *pdev)
|
|
|
|
|
|
switch (port_type) {
|
|
|
case OMAP_DISPLAY_TYPE_DPI:
|
|
|
- dpi_init_port(pdev, port);
|
|
|
+ ret = dpi_init_port(pdev, port);
|
|
|
break;
|
|
|
case OMAP_DISPLAY_TYPE_SDI:
|
|
|
- sdi_init_port(pdev, port);
|
|
|
+ ret = sdi_init_port(pdev, port);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- } while ((port = omapdss_of_get_next_port(parent, port)) != NULL);
|
|
|
+ } while (!ret &&
|
|
|
+ (port = omapdss_of_get_next_port(parent, port)) != NULL);
|
|
|
|
|
|
- return 0;
|
|
|
+ if (ret)
|
|
|
+ dss_uninit_ports(pdev);
|
|
|
+
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
static void dss_uninit_ports(struct platform_device *pdev)
|