From: Thomas Hellstrom Date: Wed, 23 Aug 2006 11:49:13 +0000 (+0200) Subject: Fix previous commit: Only fall back to hashed handles X-Git-Tag: submit/1.0/20121108.012404~1404 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea5709997329a6c425261dcc454cf7dd97a81167;p=profile%2Fivi%2Flibdrm.git Fix previous commit: Only fall back to hashed handles when there is a duplicate handle error. Not for other errors. --- diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index 13b0b17..1d9c038 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,