From patchwork Thu Aug 25 13:37:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Jarosch X-Patchwork-Id: 1096622 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7PEJ3M8013654 for ; Thu, 25 Aug 2011 14:19:23 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4A20A0A5E for ; Thu, 25 Aug 2011 07:19:02 -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.6 (demeter2.kernel.org [140.211.167.43]); Thu, 25 Aug 2011 14:19:23 +0000 (UTC) X-Greylist: delayed 1541 seconds by postgrey-1.31 at gabe; Thu, 25 Aug 2011 07:03:30 PDT Received: from rs04.intra2net.com (rs04.intra2net.com [85.214.66.2]) by gabe.freedesktop.org (Postfix) with ESMTP id 357A79E771 for ; Thu, 25 Aug 2011 07:03:29 -0700 (PDT) Received: from intranator.m.i2n (unknown [172.16.1.99]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by rs04.intra2net.com (Postfix) with ESMTP id 85B0E22010B; Thu, 25 Aug 2011 15:37:47 +0200 (CEST) Received: from localhost (intranator.m.i2n [127.0.0.1]) by localhost (Postfix) with ESMTP id 3D8192AC54; Thu, 25 Aug 2011 15:37:47 +0200 (CEST) X-Virus-Scanned: by Intranator (www.intra2net.com) with AMaViS and F-Secure AntiVirus (fsavdb 2011-08-25_05) X-Spam-Status: X-Spam-Level: 0 Received: from storm.localnet (storm.m.i2n [172.16.1.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: smtp-auth-user) by intranator.m.i2n (Postfix) with ESMTPSA id 32E512AC52; Thu, 25 Aug 2011 15:37:46 +0200 (CEST) Subject: [PATCH] Fix wrong initializer for "locked" variable From: Thomas Jarosch Organization: Intra2net AG Date: Thu, 25 Aug 2011 15:37:45 +0200 To: dri-devel@lists.freedesktop.org MIME-Version: 1.0 Message-Id: <201108251537.45999.thomas.jarosch@intra2net.com> X-Mailman-Approved-At: Thu, 25 Aug 2011 07:18:15 -0700 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: , 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 Otherwise it just contains random memory. Issue detected by cppcheck. Signed-off-by: Thomas Jarosch Reviewed-by: Jesse Barnes --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ee1d701..f6da4e4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -878,7 +878,7 @@ static void assert_panel_unlocked(struct drm_i915_private *dev_priv, int pp_reg, lvds_reg; u32 val; enum pipe panel_pipe = PIPE_A; - bool locked = locked; + bool locked = true; if (HAS_PCH_SPLIT(dev_priv->dev)) { pp_reg = PCH_PP_CONTROL;