Browse Source

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 <benjamin.gaignard@linaro.org>
Benjamin Gaignard 10 years ago
parent
commit
f78e772a2c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      drivers/gpu/drm/sti/sti_drm_drv.c

+ 5 - 1
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);