Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3011241pxb; Mon, 18 Oct 2021 06:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJCCdtUodIDETkvPtMhcItlwYmEgjm59+Tq2da4Bxa3vInGGbS++7BkHhGYcexVV+aBK2+ X-Received: by 2002:a17:90b:3581:: with SMTP id mm1mr47264074pjb.93.1634564045194; Mon, 18 Oct 2021 06:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564045; cv=none; d=google.com; s=arc-20160816; b=lB/ghakJK7Ea4IgprMjFCEubOWpIj1uNAVpSk4t7wyOwYh/obdVpvjY2l6kZJgK2KD j0CGrdlIKbZyeAKIRDk31mAY0SsJf1aEbsIgoca4tSGgCSw58TJ5pq8MHmGcf66EYGTe OwsYSxYL5Vr/mnssX2zPr44ZohuPBmsBS2zx/2RDysQh0H9O3jrPffw9gEXxSldWNYxs BCFu9CJQgP21fEHoBPoJkp2vLiX/q/7CtKiW67fgHoIwg6p5kTTsdHXfcBN0kQr9etAx 20wvmQnkHIafY0jQ/Zu/7RJOR13TMjp9fN+qjAFa8GWEr/B/RPTArQLEc5AAT+dWmXx6 nEqQ== 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=yJd5ckQDoA3BVuBfaeVhskmQdvxEOFamUcPmZ0r3FpQ=; b=cSTMZghM81T2yNkp7frKn5VW2jBHCwD2zTkOm/9WLJsOL7jhYCbQ2VDJ3x3/OPmZ5Q VSkyYR0VPhMHHsf//x3eDS7dfoaEDvTLuJkhuMuILhJcGxpqRUdFisJG0oJluP68p4xI jbnLEE2iGizImv3K7f3yYD9vnDeAa5QE3k9CYiLP/rHLuQnCPSc0R+7jGAQucdb4J242 ld03PnTPE1kBn6AwOAnBTQPZpTEVB7bSeABGpfBFQ07I85Zfsa9i5GOEMk2T4NpMgd9x MXg08ykq6xHPBExJiY9/dMhQUxraIdRHX6/3ZcIWzyGiU35mwwZ1RWIPJMNc4oZ1y4EP 1xXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nTY4bMMQ; 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 d30si18755074pjk.112.2021.10.18.06.33.50; Mon, 18 Oct 2021 06:34:05 -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=nTY4bMMQ; 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 S232803AbhJRNdw (ORCPT + 99 others); Mon, 18 Oct 2021 09:33:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:42496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbhJRNcG (ORCPT ); Mon, 18 Oct 2021 09:32:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD57061371; Mon, 18 Oct 2021 13:29:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563742; bh=CUwO4p1OoWHyzUG9wwNwu9Do9Enkrl8bJ3sUCcxMLHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nTY4bMMQLJHGB7alB9j9IUIOpeg5u4N5ERRCpDQRNkCciSmJgax/Ta90TLtLnaEGo eGEwOid02Ik9e75EYhSRgsI7Xx8bMwq4JUZt87hD66pZwAEKQOune7rQ2p7p62SXrC azH55EhgeoUf78quEtpXN0ikzg69QvVKZ6KCatjY= 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 4.19 46/50] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Date: Mon, 18 Oct 2021 15:24:53 +0200 Message-Id: <20211018132328.045930924@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132326.529486647@linuxfoundation.org> References: <20211018132326.529486647@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 @@ -468,7 +468,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;