drm/i915: Set the error code after failing to insert new offset into mm ht.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Dec 2009 15:15:30 +0000 (15:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:04:43 +0000 (14:04 -0800)
commit 5618ca6abc2d6f475b258badc017a5254cf43d1b upstream.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_gem.c

index abfc27b0c2eaea77bf8f64eee6ec8f2f3908cefb..5ddbd38201b0b2d78ff9cb94284d7e01b3f54d3e 100644 (file)
@@ -1288,6 +1288,7 @@ i915_gem_create_mmap_offset(struct drm_gem_object *obj)
        list->hash.key = list->file_offset_node->start;
        if (drm_ht_insert_item(&mm->offset_hash, &list->hash)) {
                DRM_ERROR("failed to add to map hash\n");
+               ret = -ENOMEM;
                goto out_free_mm;
        }