From patchwork Sat Oct 2 13:59:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 226931 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o92EM418030971 for ; Sat, 2 Oct 2010 14:22:26 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 917059ECE7 for ; Sat, 2 Oct 2010 07:22:03 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 02 Oct 2010 14:22:26 +0000 (UTC) X-Greylist: delayed 1616 seconds by postgrey-1.31 at gabe; Sat, 02 Oct 2010 07:21:55 PDT Received: from mgw2.diku.dk (mgw2.diku.dk [130.225.96.92]) by gabe.freedesktop.org (Postfix) with ESMTP id 4A2989E824 for ; Sat, 2 Oct 2010 07:21:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 431C219BC4C; Sat, 2 Oct 2010 15:54:57 +0200 (CEST) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19687-15; Sat, 2 Oct 2010 15:54:56 +0200 (CEST) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id A0C4319BC54; Sat, 2 Oct 2010 15:54:54 +0200 (CEST) From: Julia Lawall To: David Airlie Subject: [PATCH 3/4] drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code Date: Sat, 2 Oct 2010 15:59:17 +0200 Message-Id: <1286027958-7333-3-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.1 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bced9b2..cfe5978 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3258,6 +3258,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; } if (reloc->write_domain & I915_GEM_DOMAIN_CPU ||