drm/exynos: Fix suspend/resume support
Hello Marek Szyprowski,
This is a semi-automatic email about new static checker warnings.
The patch 6e8edf8a7d8d: "drm/exynos: Fix suspend/resume support" from Sep 14, 2017, leads to the following Smatch complaint:
drivers/gpu/drm/exynos/exynos_drm_drv.c:173 exynos_drm_suspend()
warn: variable dereferenced before check 'drm_dev' (see line 171)
drivers/gpu/drm/exynos/exynos_drm_drv.c
170 struct drm_device *drm_dev = dev_get_drvdata(dev);
171 struct exynos_drm_private *private = drm_dev->dev_private;
^^^^^^^^^^^^^^^^^^^^The patch adds a new dereference,
172
173 if (pm_runtime_suspended(dev) || !drm_dev)
^^^^^^^
but the old code had a check for NULL.
174 return 0;
175
There is a similar issue in exynos_drm_resume().
regards,
dan carpenter