Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3038055pxb; Mon, 18 Oct 2021 07:05:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrBrI/8vZsckq3lbIj3hhIJjcpzbTBYU+Om13PXvkfUSYaY2Q68Rr7kcbzcViY0b/3CEmb X-Received: by 2002:a63:b349:: with SMTP id x9mr23797786pgt.421.1634565931245; Mon, 18 Oct 2021 07:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565931; cv=none; d=google.com; s=arc-20160816; b=m2Kypv5zFtgaViXLq83dAM1c8nPsQiRQDqklNg/lXw4VjNOxy5+ypDaIWZMRU66eHg Bqi/iI+QAfcNtPZMUdpFJFmw+evKRjos9ezlTcVmN+4Wxl6OYlykjt4bkUf7q70GJtY7 pKQlXVW9ON+UiQXxl4k6jsp+nmj548dRQwRvRaMGCvIqU3h3vAYL9bV7bsNkivAEEQaB sg0KH/FwPwJrjw2bVo/f/2ZSIzF2Zeh0sBO00igpEvagf0Ku+xMVdUeb7pzodS2FQBWx 650Vram0QgUibzby2cTjmfUto+Bj1lGLdZXoWcNcX5rOCauLESOq7gEzfc5+Bjd6eKml 8dXw== 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=4dTX0EvRaZIfYDYHXw5QF9LeGjeUKGjQC7bEjX7NlYY=; b=Uq6FyBlpevB1S8vCYTeffGfZZKPtFmaulrQwewGp6BnSZWQf2R0sLKG6UNIeSOXg8O 3Vqx5IEql5Ktu+a+oFvpDtP2wmvfQdT8mrm/z0C7hwgKuRVpLocYO0wjTpdCbwyW81OS M3mtr7v0oW3raCSEjT1NPfYjlERVQt7i9aEBMYxnBFJk2OEO/DO3y2eSHp9f3NOuZEiU uFTJRgPhLhkbM6scML47fdeYGYk5WujAtwnjLw7ko6jJPiVPzCHddOysv07Sl5gLy0Uk HycDaoRNwOLadroqsfzHSGfAfLaetalMJXxY+UC8M3wMmk8ivcMNd5qPCYBzkKMIyBVr S1MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K7zQBexJ; 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 e18si25447536plh.102.2021.10.18.07.05.17; Mon, 18 Oct 2021 07:05:31 -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=K7zQBexJ; 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 S232844AbhJROFV (ORCPT + 99 others); Mon, 18 Oct 2021 10:05:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:39880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233325AbhJROB1 (ORCPT ); Mon, 18 Oct 2021 10:01:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7ABA861A58; Mon, 18 Oct 2021 13:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564563; bh=bBpt/wcDMPjiY5v/6Ck2J4t5GQwWI5LgaLenV6OshMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7zQBexJ+PXlXjZbRuvmq41jcbkn9IEnHapnsJs7moNJROR8MWR/TWIq8qgYcUvuu kCIuQ6nIfsm/whmGqEZGdEKLI7wCCEsCUErGFYtubnPYLWWx9yqWgmF8Rz6JwL7Puu BAWMqUxgAiG0pnvsIVp+1dr0vXjrSZXEp15B1hxA= 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.14 135/151] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Date: Mon, 18 Oct 2021 15:25:14 +0200 Message-Id: <20211018132345.052464109@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@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 @@ -463,7 +463,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;