From patchwork Tue Feb 9 20:11:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 8266931 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC9FABEEED for ; Wed, 10 Feb 2016 00:16:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23227202F0 for ; Wed, 10 Feb 2016 00:16:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A59A5202E6 for ; Wed, 10 Feb 2016 00:16:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99BCC6E626; Tue, 9 Feb 2016 16:16:36 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id DC3766E5EB for ; Tue, 9 Feb 2016 12:11:29 -0800 (PST) Received: by mail-wm0-f47.google.com with SMTP id p63so174368909wmp.1 for ; Tue, 09 Feb 2016 12:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zsvuA5S+T2koqfUj45w8146n+cad7artnHNG0jJm2vQ=; b=QlEcbK6lysgGvVuYu0NJvKPX7DOvyg+P0EMrrSJ+y/R7tSm9qPOB0N7FBABjYqmyVy yRApHgVe+62qHsumsjUMr5BGXzdQxaDMKbseip7vUkL+lnE5qwy+aO/3vvU7Q4hpFTu8 QkxyvMTtHvGeweaiPNhbArfGtado3jrzHDjhI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zsvuA5S+T2koqfUj45w8146n+cad7artnHNG0jJm2vQ=; b=h6fFsCNPQeJQurc2MNmZSm6IQEvDbDIVzpwiUeU5+rO9d2GzKa1pRn+BHDoIudOpKd 1loav1VxkWVzdPCceNZXwN9krNWRqdfO2exc9kbSUdHWm9rR7FOa1vQzh2K/iE2wL3Bc sBfaa6HIUoTHmf0wpSLK/AxgjXJ8Mo3CQ+1O1Da8oWXWV4JEEdGaswmFAmd2YxqyJU5S HQOEternSO9vEEH++7Uiys4fuWd5YvAa09DcAwscEN6KfL0N2RIoZonjX50YVduAYtB9 QcTf9xxaKLooS6A3dtWWAgSpgt/o2ZYrOOiVMXtWb71Ifrp3J2XCJsjdsPXFdJM6enm5 4MlQ== X-Gm-Message-State: AG10YOSs2vs5g/QAv3WmI2OI+vS8e2CwJ+SdCcn8742Xla8RockUjEPcCDOkIfdW4Nze0A== X-Received: by 10.28.216.134 with SMTP id p128mr6415803wmg.59.1455048688595; Tue, 09 Feb 2016 12:11:28 -0800 (PST) Received: from wildmoose.dk (lvps87-230-87-209.dedicated.hosteurope.de. [87.230.87.209]) by smtp.gmail.com with ESMTPSA id h14sm1384331wjs.41.2016.02.09.12.11.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Feb 2016 12:11:28 -0800 (PST) From: Rasmus Villemoes To: Daniel Vetter , Jani Nikula , David Airlie Subject: [PATCH 2/5] drm/i915: fix error path in intel_setup_gmbus() Date: Tue, 9 Feb 2016 21:11:13 +0100 Message-Id: <1455048677-19882-3-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455048677-19882-1-git-send-email-linux@rasmusvillemoes.dk> References: <1455048677-19882-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailman-Approved-At: Tue, 09 Feb 2016 16:16:35 -0800 Cc: intel-gfx@lists.freedesktop.org, Rasmus Villemoes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This fails to undo the setup for pin==0; moreover, something interesting happens if the setup failed already at pin==0. Signed-off-by: Rasmus Villemoes --- drivers/gpu/drm/i915/intel_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 25254b5c1ac5..deb8282c26d8 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -683,7 +683,7 @@ int intel_setup_gmbus(struct drm_device *dev) return 0; err: - while (--pin) { + while (pin--) { if (!intel_gmbus_is_valid_pin(dev_priv, pin)) continue;