Re: [PATCH v2 07/60] drm/omap: dss: Handle DPI and SDI port initialization failures

2018-06-10 Thread Sebastian Reichel
On Sat, May 26, 2018 at 08:24:25PM +0300, Laurent Pinchart wrote:
> 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: Laurent Pinchart 
> ---

Reviewed-by: Sebastian Reichel 

-- Sebastian

>  drivers/gpu/drm/omapdrm/dss/dss.c | 13 ++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c 
> b/drivers/gpu/drm/omapdrm/dss/dss.c
> index abd45b08f3a1..59b238f03437 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -1183,7 +1183,8 @@ static int dss_init_ports(struct dss_device *dss)
>   struct platform_device *pdev = dss->pdev;
>   struct device_node *parent = pdev->dev.of_node;
>   struct device_node *port;
> - int i;
> + unsigned int i;
> + int r;
>  
>   for (i = 0; i < dss->feat->num_ports; i++) {
>   port = of_graph_get_port_by_id(parent, i);
> @@ -1192,11 +1193,17 @@ static int dss_init_ports(struct dss_device *dss)
>  
>   switch (dss->feat->ports[i]) {
>   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;
> +
>   case OMAP_DISPLAY_TYPE_SDI:
> - sdi_init_port(dss, pdev, port);
> + r = sdi_init_port(dss, pdev, port);
> + if (r)
> + return r;
>   break;
> +
>   default:
>   break;
>   }
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 07/60] drm/omap: dss: Handle DPI and SDI port initialization failures

2018-05-26 Thread Laurent Pinchart
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: Laurent Pinchart 
---
 drivers/gpu/drm/omapdrm/dss/dss.c | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c 
b/drivers/gpu/drm/omapdrm/dss/dss.c
index abd45b08f3a1..59b238f03437 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -1183,7 +1183,8 @@ static int dss_init_ports(struct dss_device *dss)
struct platform_device *pdev = dss->pdev;
struct device_node *parent = pdev->dev.of_node;
struct device_node *port;
-   int i;
+   unsigned int i;
+   int r;
 
for (i = 0; i < dss->feat->num_ports; i++) {
port = of_graph_get_port_by_id(parent, i);
@@ -1192,11 +1193,17 @@ static int dss_init_ports(struct dss_device *dss)
 
switch (dss->feat->ports[i]) {
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;
+
case OMAP_DISPLAY_TYPE_SDI:
-   sdi_init_port(dss, pdev, port);
+   r = sdi_init_port(dss, pdev, port);
+   if (r)
+   return r;
break;
+
default:
break;
}
-- 
Regards,

Laurent Pinchart

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel