drm: Sync drm_gem_close_ioctl() with Linux 3.14
authorFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 31 May 2015 16:06:33 +0000 (18:06 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sun, 31 May 2015 16:09:58 +0000 (18:09 +0200)
sys/dev/drm/drm_gem.c

index 32c8837..48ccc42 100644 (file)
@@ -485,11 +485,14 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
                    struct drm_file *file_priv)
 {
        struct drm_gem_close *args = data;
+       int ret;
 
-       if (!drm_core_check_feature(dev, DRIVER_GEM))
-               return (ENODEV);
+       if (!(dev->driver->driver_features & DRIVER_GEM))
+               return -ENODEV;
+
+       ret = drm_gem_handle_delete(file_priv, args->handle);
 
-       return (drm_gem_handle_delete(file_priv, args->handle));
+       return ret;
 }
 
 /**