summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_drv.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2017-10-09 10:44:01 +0200
committerInki Dae <inki.dae@samsung.com>2017-10-16 07:44:49 +0900
commit238604ca0b708319e089e22545bcda39afb5faa8 (patch)
tree9fd7845c9bc84181250fb24867e62f83949a304f /drivers/gpu/drm/exynos/exynos_drm_drv.c
parent0a51897bfac9886d36e986d009df0317582b19a2 (diff)
downloadop-kernel-dev-238604ca0b708319e089e22545bcda39afb5faa8.zip
op-kernel-dev-238604ca0b708319e089e22545bcda39afb5faa8.tar.gz
drm/exynos: Clear drvdata after component unbind
When components are unbound, DRM driver is unregistered and freed, so clear drvdata to avoid potential use-after-free issue in suspend/resume paths. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_drv.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index aa770bb..82b7242 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -430,6 +430,7 @@ static void exynos_drm_unbind(struct device *dev)
kfree(drm->dev_private);
drm->dev_private = NULL;
+ dev_set_drvdata(dev, NULL);
drm_dev_unref(drm);
}
OpenPOWER on IntegriCloud