summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-12-20 00:07:11 +0100
committerDave Airlie <airlied@linux.ie>2008-12-29 08:47:27 +0100
commitf51c5b6e623cc737d47f513cbb893cec914f0bd2 (patch)
tree3c290a4ba36531b749985636f62aa90263a7dd1b /drivers/gpu
parentdrm/i915: Don't print to dmesg when taking signal during object_pin. (diff)
downloadlinux-f51c5b6e623cc737d47f513cbb893cec914f0bd2.tar.xz
linux-f51c5b6e623cc737d47f513cbb893cec914f0bd2.zip
drm: Avoid use-before-null-test on dev in drm_cleanup().
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_drv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 373e3de64340..febb517ee679 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -294,8 +294,6 @@ EXPORT_SYMBOL(drm_init);
*/
static void drm_cleanup(struct drm_device * dev)
{
- struct drm_driver *driver = dev->driver;
-
DRM_DEBUG("\n");
if (!dev) {
@@ -330,7 +328,7 @@ static void drm_cleanup(struct drm_device * dev)
if (drm_core_check_feature(dev, DRIVER_MODESET))
drm_put_minor(&dev->control);
- if (driver->driver_features & DRIVER_GEM)
+ if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_destroy(dev);
drm_put_minor(&dev->primary);