drm/omap: dsi: Fix missing of_platform_depopulate()
authorTony Lindgren <[email protected]>
Tue, 6 Nov 2018 15:28:02 +0000 (07:28 -0800)
committerTomi Valkeinen <[email protected]>
Mon, 12 Nov 2018 09:50:13 +0000 (11:50 +0200)
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 <[email protected]>
Reviewed-by: Laurent Pinchart <[email protected]>
Reviewed-by: Sebastian Reichel <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/omapdrm/dss/dsi.c

index 36123c086d97bf89ac01da2f1fc2c13fe380ac40..0a485c5b982eb84addaf013dd8241509ca403d04 100644 (file)
@@ -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: