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

Sebastian Reichel sre at kernel.org
Thu Nov 8 17:29:33 UTC 2018


Hi,

On Tue, Nov 06, 2018 at 07:28:02AM -0800, 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>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.com>

-- Sebastian

>  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:
> -- 
> 2.19.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181108/51aaafb1/attachment.sig>


More information about the dri-devel mailing list