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: 8265491 Return-Path: X-Original-To: patchwork-intel-gfx@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 E08F6BEEE5 for ; Tue, 9 Feb 2016 20:11:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A52B201BC for ; Tue, 9 Feb 2016 20:11:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E9BE82026C for ; Tue, 9 Feb 2016 20:11:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 686946E15E; Tue, 9 Feb 2016 12:11:31 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFF496E5ED for ; Tue, 9 Feb 2016 12:11:29 -0800 (PST) Received: by mail-wm0-f46.google.com with SMTP id p63so38480758wmp.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=iZ73X5wQ1HqhI0RJ/nnzJyqtiop7114OYSQbLi3EP5jcomZBN0CKkd0WSfNSv0LfCD Zkg6glTsi8rP2CusjBlFNKphishcLDJ0lYPFjPq/q02tfkyFmgTllAFHJYbblaSlfzFd Xevy8OEEjBxBCkkNNqMQqyVIf55KbP5Q0B9zfSJHVyORizRqid7tyHLGfYr55ZVXfOx/ vRF0rPOv34aIR1cbKUafupKN5DyteemMx+X6pNHsnKdWh/jT2/YIx3iVFPENM3EzZCbP PkOUah/daR6WNCzaebB8ScYhKgioGkgCYnOZI1Xi4TOeybR2w29hSEfhKRO2q+YuU8+F Gsrw== X-Gm-Message-State: AG10YOQnQhmcyRBaEuFcc6PHml16rjvtpMr/NX3ZMaIKH73VEJnScRXLBzEzwoPfv/w3Fw== 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 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> Cc: intel-gfx@lists.freedesktop.org, Rasmus Villemoes , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 2/5] drm/i915: fix error path in intel_setup_gmbus() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Reviewed-by: Jani Nikula --- 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;