From f78e772a2c7aa4e96398de9e3fa0be750c705d3a Mon Sep 17 00:00:00 2001 From: Benjamin Gaignard Date: Thu, 11 Dec 2014 13:35:29 +0100 Subject: [PATCH] drm: sti: correctly cleanup CRTC and planes When bind failed make sure that CRTC and planes are completely clean up to avoid properties duplication. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_drm_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_drm_drv.c b/drivers/gpu/drm/sti/sti_drm_drv.c index 223d93c3a05d..9ce7574ac873 100644 --- a/drivers/gpu/drm/sti/sti_drm_drv.c +++ b/drivers/gpu/drm/sti/sti_drm_drv.c @@ -67,8 +67,12 @@ static int sti_drm_load(struct drm_device *dev, unsigned long flags) sti_drm_mode_config_init(dev); ret = component_bind_all(dev->dev, dev); - if (ret) + if (ret) { + drm_kms_helper_poll_fini(dev); + drm_mode_config_cleanup(dev); + kfree(private); return ret; + } drm_helper_disable_unused_functions(dev); -- 2.34.1