Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1487952874-23635-3-git-send-email-benjamin.gaignard@linaro.org

authored by

Benjamin Gaignard and committed by
Daniel Vetter
ac7d3af8 38b0b219

+1 -2
+1 -2
drivers/gpu/drm/sti/sti_drv.c
··· 324 324 325 325 dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); 326 326 327 - of_platform_populate(node, NULL, NULL, dev); 327 + devm_of_platform_populate(dev); 328 328 329 329 child_np = of_get_next_available_child(node, NULL); 330 330 ··· 340 340 static int sti_platform_remove(struct platform_device *pdev) 341 341 { 342 342 component_master_del(&pdev->dev, &sti_ops); 343 - of_platform_depopulate(&pdev->dev); 344 343 345 344 return 0; 346 345 }