From ea5709997329a6c425261dcc454cf7dd97a81167 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 23 Aug 2006 13:49:13 +0200 Subject: Fix previous commit: Only fall back to hashed handles when there is a duplicate handle error. Not for other errors. --- linux-core/drm_bufs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux-core') diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index 13b0b174..1d9c0386 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -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, -- cgit v1.2.3