aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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);
294 */ 294 */
295static void drm_cleanup(struct drm_device * dev) 295static void drm_cleanup(struct drm_device * dev)
296{ 296{
297 struct drm_driver *driver = dev->driver;
298
299 DRM_DEBUG("\n"); 297 DRM_DEBUG("\n");
300 298
301 if (!dev) { 299 if (!dev) {
@@ -330,7 +328,7 @@ static void drm_cleanup(struct drm_device * dev)
330 if (drm_core_check_feature(dev, DRIVER_MODESET)) 328 if (drm_core_check_feature(dev, DRIVER_MODESET))
331 drm_put_minor(&dev->control); 329 drm_put_minor(&dev->control);
332 330
333 if (driver->driver_features & DRIVER_GEM) 331 if (dev->driver->driver_features & DRIVER_GEM)
334 drm_gem_destroy(dev); 332 drm_gem_destroy(dev);
335 333
336 drm_put_minor(&dev->primary); 334 drm_put_minor(&dev->primary);