aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-09-09 09:16:06 -0400
committerInki Dae <daeinki@gmail.com>2014-09-19 11:56:14 -0400
commit9f3dd7dbc5a5b6048d7dfccff5e0e9d8b50ff674 (patch)
treebe586ea7b87e322347728094afcded230150fe92 /drivers/gpu/drm/exynos
parenta36ed466870ef65755492a69886a38362d33d90e (diff)
drm/exynos: fix drm driver de-initialization order
Since components have their own cleanup routines calling drm_mode_config_cleanup before component_unbind_all causes errors due to double free of KMS objects. The patch fixes it by changing de-initialization order. Now it is exactly opposite to init order. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 3f6ec9670659..9b00e4ecdb3a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -136,14 +136,14 @@ static int exynos_drm_unload(struct drm_device *dev)
136 exynos_drm_device_subdrv_remove(dev); 136 exynos_drm_device_subdrv_remove(dev);
137 137
138 exynos_drm_fbdev_fini(dev); 138 exynos_drm_fbdev_fini(dev);
139 drm_vblank_cleanup(dev);
140 drm_kms_helper_poll_fini(dev); 139 drm_kms_helper_poll_fini(dev);
141 drm_mode_config_cleanup(dev);
142 140
141 component_unbind_all(dev->dev, dev);
142 drm_vblank_cleanup(dev);
143 drm_mode_config_cleanup(dev);
143 drm_release_iommu_mapping(dev); 144 drm_release_iommu_mapping(dev);
144 kfree(dev->dev_private);
145 145
146 component_unbind_all(dev->dev, dev); 146 kfree(dev->dev_private);
147 dev->dev_private = NULL; 147 dev->dev_private = NULL;
148 148
149 return 0; 149 return 0;