drm/exynos: Fix potential NULL pointer dereference in suspend/resume paths
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 9 Oct 2017 08:43:53 +0000 (10:43 +0200)
committerInki Dae <inki.dae@samsung.com>
Sun, 15 Oct 2017 22:44:48 +0000 (07:44 +0900)
commit0a51897bfac9886d36e986d009df0317582b19a2
treecdcb0d3dae6cf559a8c953168ad734fbf5ce948a
parenta480f30846d19b50106b3243d9d48683d2966249
drm/exynos: Fix potential NULL pointer dereference in suspend/resume paths

The patch 6e8edf8a7d8d: "drm/exynos: Fix suspend/resume support" introduced
a new code in suspend/resume paths. However it unconditionally dereference
drm_dev pointer, which might be NULL if suspend/resume happens before
Exynos DRM driver components bind. This patch fixes this issue.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 6e8edf8a7d8d "drm/exynos: Fix suspend/resume support"
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c