Use devm_of_platform_populate() to be sure that of_platform_depopulate
is called when removing the driver.

Signed-off-by: Benjamin Gaignard <[email protected]>

CC: Shawn Guo <[email protected]>
CC: David Airlie <[email protected]>
CC: [email protected]
CC: [email protected]
---
 drivers/gpu/drm/zte/zx_drm_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
index 614e854..f2b1e5f 100644
--- a/drivers/gpu/drm/zte/zx_drm_drv.c
+++ b/drivers/gpu/drm/zte/zx_drm_drv.c
@@ -196,7 +196,7 @@ static int zx_drm_probe(struct platform_device *pdev)
        struct component_match *match = NULL;
        int ret;
 
-       ret = of_platform_populate(parent, NULL, NULL, dev);
+       ret = devm_of_platform_populate(dev);
        if (ret)
                return ret;
 
-- 
1.9.1

Reply via email to