Commit ac7d3af8 authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Daniel Vetter

drm: sti: make driver use devm_of_platform_populate()

This make sure that of_platform_depopulate() is called if an error
occur in probe after populating the date from the device tree.
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1487952874-23635-3-git-send-email-benjamin.gaignard@linaro.org
parent 38b0b219
......@@ -324,7 +324,7 @@ static int sti_platform_probe(struct platform_device *pdev)
dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
of_platform_populate(node, NULL, NULL, dev);
devm_of_platform_populate(dev);
child_np = of_get_next_available_child(node, NULL);
......@@ -340,7 +340,6 @@ static int sti_platform_probe(struct platform_device *pdev)
static int sti_platform_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &sti_ops);
of_platform_depopulate(&pdev->dev);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment