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)
committerEric Anholt <eric@anholt.net>
Mon, 7 Dec 2009 23:44:30 +0000 (15:44 -0800)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_gem.c

index 5b46623..917b837 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;
        }