From: Andrzej Hajda Date: Tue, 9 Sep 2014 13:16:06 +0000 (+0200) Subject: drm/exynos: fix drm driver de-initialization order X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f3dd7dbc5a5b6048d7dfccff5e0e9d8b50ff674;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Inki Dae --- 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) exynos_drm_device_subdrv_remove(dev); exynos_drm_fbdev_fini(dev); - drm_vblank_cleanup(dev); drm_kms_helper_poll_fini(dev); - drm_mode_config_cleanup(dev); + component_unbind_all(dev->dev, dev); + drm_vblank_cleanup(dev); + drm_mode_config_cleanup(dev); drm_release_iommu_mapping(dev); - kfree(dev->dev_private); - component_unbind_all(dev->dev, dev); + kfree(dev->dev_private); dev->dev_private = NULL; return 0;