[PATCH] drm/omap: dsi: Fix missing of_platform_depopulate()

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Nov 7 13:30:28 UTC 2018


Hi Tony,

Thank you for the patch.

On Tuesday, 6 November 2018 17:28:02 EET Tony Lindgren wrote:
> We're missing a call to of_platform_depopulate() on errors for dsi.
> Looks like dss is already doing this.
> 
> Signed-off-by: Tony Lindgren <tony at atomide.com>

This makes sense to me. You may however want to note in the commit message 
that this patch also turns the of_platform_populate() failures into fatal 
errors.

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c
> b/drivers/gpu/drm/omapdrm/dss/dsi.c --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -5429,15 +5429,19 @@ static int dsi_probe(struct platform_device *pdev)
>  	}
> 
>  	r = of_platform_populate(dev->of_node, NULL, NULL, dev);
> -	if (r)
> +	if (r) {
>  		DSSERR("Failed to populate DSI child devices: %d\n", r);
> +		goto err_uninit_output;
> +	}
> 
>  	r = component_add(&pdev->dev, &dsi_component_ops);
>  	if (r)
> -		goto err_uninit_output;
> +		goto err_of_depopulate;
> 
>  	return 0;
> 
> +err_of_depopulate:
> +	of_platform_depopulate(dev);
>  err_uninit_output:
>  	dsi_uninit_output(dsi);
>  err_pm_disable:

-- 
Regards,

Laurent Pinchart





More information about the dri-devel mailing list