drm/i915: unpin for an invalid memory domain.
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Feb 2009 14:26:32 +0000 (14:26 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Feb 2009 02:21:11 +0000 (12:21 +1000)
A missing unreference and unpin after rejecting the relocation for an
invalid memory domain.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/i915/i915_gem.c

index f565b6afe414ec735a1f758623fc9a58455ca435..0bec4e6d336941ba8690c1ef451cde48992bfede 100644 (file)
@@ -2254,6 +2254,8 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj,
                                  (int) reloc.offset,
                                  reloc.read_domains,
                                  reloc.write_domain);
+                       drm_gem_object_unreference(target_obj);
+                       i915_gem_object_unpin(obj);
                        return -EINVAL;
                }