Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "drm/exynos: fix null pointer dereference issue"

This reverts commit cea24824ab432f8acabb254d6805e9aa756de6af.

Moving subdriver probe to exynos_drm_platform_probe() was making
exynos_drm_device_subdrv_probe() fail because the platform data wasn't set
yet. It only gets set in exynos_drm_load.

We need to find a smarter way to fix this issue.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>

authored by

Gustavo Padovan and committed by
Inki Dae
b6713957 5af3d9bb

+9 -8
+9 -8
drivers/gpu/drm/exynos/exynos_drm_drv.c
··· 108 108 if (ret) 109 109 goto err_unbind_all; 110 110 111 + /* Probe non kms sub drivers and virtual display driver. */ 112 + ret = exynos_drm_device_subdrv_probe(dev); 113 + if (ret) 114 + goto err_cleanup_vblank; 115 + 111 116 /* 112 117 * enable drm irq mode. 113 118 * - with irq_enabled = true, we can use the vblank feature. ··· 138 133 139 134 return 0; 140 135 136 + err_cleanup_vblank: 137 + drm_vblank_cleanup(dev); 141 138 err_unbind_all: 142 139 component_unbind_all(dev->dev, dev); 143 140 err_mode_config_cleanup: ··· 153 146 154 147 static int exynos_drm_unload(struct drm_device *dev) 155 148 { 149 + exynos_drm_device_subdrv_remove(dev); 150 + 156 151 exynos_drm_fbdev_fini(dev); 157 152 drm_kms_helper_poll_fini(dev); 158 153 ··· 623 614 if (ret < 0) 624 615 goto err_unregister_non_kms_drivers; 625 616 626 - /* Probe non kms sub drivers and virtual display driver. */ 627 - ret = exynos_drm_device_subdrv_probe(platform_get_drvdata(pdev)); 628 - if (ret) 629 - goto err_unregister_resources; 630 - 631 617 return ret; 632 618 633 - err_unregister_resources: 634 619 #ifdef CONFIG_DRM_EXYNOS_IPP 635 620 exynos_platform_device_ipp_unregister(); 636 621 #endif ··· 645 642 static int exynos_drm_platform_remove(struct platform_device *pdev) 646 643 { 647 644 int i; 648 - 649 - exynos_drm_device_subdrv_remove(platform_get_drvdata(pdev)); 650 645 651 646 #ifdef CONFIG_DRM_EXYNOS_IPP 652 647 exynos_platform_device_ipp_unregister();