Fix previous commit: Only fall back to hashed handles
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Wed, 23 Aug 2006 11:49:13 +0000 (13:49 +0200)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Wed, 23 Aug 2006 11:49:13 +0000 (13:49 +0200)
when there is a duplicate handle error. Not for other errors.

linux-core/drm_bufs.c

index 13b0b17..1d9c038 100644 (file)
@@ -82,8 +82,8 @@ int drm_map_handle(drm_device_t *dev, drm_hash_item_t *hash,
                int ret;
                hash->key = user_token;
                ret = drm_ht_insert_item(&dev->map_hash, hash);
-               if (!ret
-                       return 0;
+               if (ret != -EINVAL
+                       return ret;
        }
        return drm_ht_just_insert_please(&dev->map_hash, hash, 
                                         user_token, 32 - PAGE_SHIFT - 3,