Patchwork [08/48] drm: omapdrm: venc: Return error code on OF parsing failure

login
register
mail settings
Submitter Laurent Pinchart
Date Oct. 13, 2017, 2:59 p.m.
Message ID <20171013145944.26557-9-laurent.pinchart@ideasonboard.com>
Download mbox | patch
Permalink /patch/10004971/
State New
Headers show

Comments

Laurent Pinchart - Oct. 13, 2017, 2:59 p.m.
The venc_probe_of() function has an error cleanup path that returns
success instead of an error code. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/dss/venc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Sebastian Reichel - Oct. 14, 2017, 12:29 p.m.
Hi,

On Fri, Oct 13, 2017 at 05:59:04PM +0300, Laurent Pinchart wrote:
> The venc_probe_of() function has an error cleanup path that returns
> success instead of an error code. Fix it.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Maybe this should be tagged for stable backporting?

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

>  drivers/gpu/drm/omapdrm/dss/venc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
> index d58da6f32693..1b0fa952b494 100644
> --- a/drivers/gpu/drm/omapdrm/dss/venc.c
> +++ b/drivers/gpu/drm/omapdrm/dss/venc.c
> @@ -857,10 +857,10 @@ static int venc_probe_of(struct platform_device *pdev)
>  	of_node_put(ep);
>  
>  	return 0;
> +
>  err:
>  	of_node_put(ep);
> -
> -	return 0;
> +	return r;
>  }
>  
>  /* VENC HW IP initialisation */
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index d58da6f32693..1b0fa952b494 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -857,10 +857,10 @@  static int venc_probe_of(struct platform_device *pdev)
 	of_node_put(ep);
 
 	return 0;
+
 err:
 	of_node_put(ep);
-
-	return 0;
+	return r;
 }
 
 /* VENC HW IP initialisation */