Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3015920pxb; Mon, 18 Oct 2021 06:39:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR8RZ5iMSPwJZEldoEtxVUejLmAjwyGJnRQcG2fDZVjgIvTirKnd6c/5WOBvXAJ7FiShxn X-Received: by 2002:a05:6a00:2296:b0:44d:e2f7:4d1c with SMTP id f22-20020a056a00229600b0044de2f74d1cmr2212633pfe.63.1634564377192; Mon, 18 Oct 2021 06:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564377; cv=none; d=google.com; s=arc-20160816; b=LV6ZxQBdNx5h2ew5p1iyLUxjll4x5c6xq1lyZ3FXNmEWex/HH9ex7JG6qoXU9E6Jxm VpdHqifr8TIc2V5jYzXN1dPXUJ4QDBiJGhfVa1hI+Z90JZFJFBNo78l2tytScnIkBnaJ Khm5/DpdAypv7kH5BPzFW1kuD8f/TLghEJKNtEmBhETUVpL8TFOOYVyldVnXyewJKQFC BZRo8QDeRjZL8/0GG5LS7xomQwM+g0zvp/5kuZONyQCuDXEHsm9IRUoULgkNxfTmM1rW t/KlD+SmBqkUM91OSjQioyiNfk5tsHDNvZ+9pY3bWSdXxka4LrKrezcvDZimLc1J/W8L Tbsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J+7Y6feeVK7EQM9uE2z7ALU+PYfTp1dqE+gOL1nvDCo=; b=aqtfhQnCNAiApKh7DreQ6uGxIrZo+h6aH271io1r5gjYTODP507skVk7WdWilOp2Mj jGOG5IS98TN61S2+L3Aj3cQbeFV3h/skggh3AJoL9LPg0T7C0Pb4XsOy5EJJF9ddpuXh op7P495huo48PBEhVfOIMaCwovdWJRyuZDRy4YG5rYXEYDSiVmzAktDTAoh6ahuZjGWk mXtZ/JM+YdneRDCe+7XPKzkKUugkzL++5TCOHxyuLZEGu7flADO7Fn57gMfe5eG2nneI DuTHS/Mi8rU232YK3ydQpFkyFWMGKFwRGKDsHISmd0Va/qCePu0DL4Y2gSKPprVqCy3v LD+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=If5DVWFE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k23si20312579pll.75.2021.10.18.06.39.23; Mon, 18 Oct 2021 06:39:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=If5DVWFE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232909AbhJRNkS (ORCPT + 99 others); Mon, 18 Oct 2021 09:40:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:55140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233387AbhJRNiN (ORCPT ); Mon, 18 Oct 2021 09:38:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AB0F16135F; Mon, 18 Oct 2021 13:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563912; bh=MREsAtc/Jb5z/qYIxI/HXY9GmLMitSFau5Ot4mCAuRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=If5DVWFEsjmxAQER9FNZ98bVAMX112Zm9VYKE50pIT4zBlC5zuBq48NqG+nIe8giD HCx25t1iZaSlngUJQXTLD86yNKOitDi+I3BrKj5dQu5XnZXCixscqEiRl8MThm1VKt FQUQEvQ8oR8cBrDo5maXhnA/8VrPOnrxdcZgbMaU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Dmitry Baryshkov , Rob Clark Subject: [PATCH 5.4 64/69] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Date: Mon, 18 Oct 2021 15:25:02 +0200 Message-Id: <20211018132331.588380413@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132329.453964125@linuxfoundation.org> References: <20211018132329.453964125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit c8f01ffc83923a91e8087aaa077de13354a7aa59 upstream. This disables a lock which wasn't enabled and it does not disable the first lock in the array. Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20211001123409.GG2283@kili Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -460,7 +460,7 @@ static int dsi_bus_clk_enable(struct msm return 0; err: - for (; i > 0; i--) + while (--i >= 0) clk_disable_unprepare(msm_host->bus_clks[i]); return ret;