From patchwork Mon Jun 14 20:26:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Justin P. Mattock" X-Patchwork-Id: 106031 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5EKSdS6005790 for ; Mon, 14 Jun 2010 20:28:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848Ab0FNU1B (ORCPT ); Mon, 14 Jun 2010 16:27:01 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:52855 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755821Ab0FNU06 (ORCPT ); Mon, 14 Jun 2010 16:26:58 -0400 Received: by mail-pv0-f174.google.com with SMTP id 16so3067678pvg.19 for ; Mon, 14 Jun 2010 13:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=iiCzg4yloucM9qV6pfktZ2GoJC7ujIL8vZhKeR/TK9w=; b=V69qfCnjfuYM3ijw31VPrRvETXAjivSLL3FrprDu2VkPl5HnkxsRKP/U+flm+NBkTR TUnWuJOPVB9JrpP1KcvX5Kq849u2NKzPeOOJ6jEmjgzBkJwpfzBhRYbQWWyCOI08U+38 cCGdwl4HqJ5wa/YZikvj1bOsz1Y9DrhGyLAAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=pTKolHf8PusPDX7ifEeaEgeZqwBeI4VvzU8uD5t88h15v4CmsvSuLqSLhweOM+p5zN 7URL4vnDOrxw1hbVptcxNS/u5vo2KFY7Oojo35lq4MjQKBP0MHDmb0Zqx36sLZlfslL7 eGagmlys5NIHs7vD1RKsZ7LVb2w9ZDieUV+bE= Received: by 10.115.117.38 with SMTP id u38mr4898059wam.168.1276547217811; Mon, 14 Jun 2010 13:26:57 -0700 (PDT) Received: from localhost.localdomain ([76.91.45.220]) by mx.google.com with ESMTPS id r20sm58982854wam.5.2010.06.14.13.26.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Jun 2010 13:26:57 -0700 (PDT) From: "Justin P. Mattock" To: linux-kernel@vger.kernel.org Cc: reiserfs-devel@vger.kernel.org, linux-bluetooth@vger.kernel.org, clemens@ladisch.de, debora@linux.vnet.ibm.com, dri-devel@lists.freedesktop.org, linux-i2c@vger.kernel.org, linux1394-devel@lists.sourceforge.net, linux-media@vger.kernel.org, "Justin P. Mattock" Subject: [PATCH 5/8]drm:drm_gem Fix warning: variable 'dev' set but not used Date: Mon, 14 Jun 2010 13:26:45 -0700 Message-Id: <1276547208-26569-6-git-send-email-justinmattock@gmail.com> X-Mailer: git-send-email 1.7.1.rc1.21.gf3bd6 In-Reply-To: <1276547208-26569-1-git-send-email-justinmattock@gmail.com> References: <1276547208-26569-1-git-send-email-justinmattock@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 14 Jun 2010 20:28:39 +0000 (UTC) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 33dad3f..e8180c9 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -206,6 +206,8 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle) return -EINVAL; } dev = obj->dev; + if (!dev) + dev = 0; /* Release reference and decrement refcount. */ idr_remove(&filp->object_idr, handle);