Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3023572pxb; Mon, 18 Oct 2021 06:48:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCy6YAqFaboPZml4XCzVic1i3+0XaFmjMUpeUnmiBOkG42XHZqx1cQP/T7WAe0LpzTHoxR X-Received: by 2002:a17:902:f1c2:b0:13f:a29f:b512 with SMTP id e2-20020a170902f1c200b0013fa29fb512mr13689941plc.61.1634564926835; Mon, 18 Oct 2021 06:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564926; cv=none; d=google.com; s=arc-20160816; b=QR7m7LbwlSWALXzeVmqT1DDvgblh1Vf+WCOlpbsHReo8SyU6BqiywSuGNMQvS47mC+ tKCZZa3BjQ5xqfbWA3LpTFpcpkmL+Fu+3/X+j4LVzN7Gt5PuXvuMp9GQ768fLYh3C1z5 397GSzbmXxUcwiz92e2Cd+L60azj52UceECyajMntKeWwQxxdEhzjmL8Cl0FpSlsAeiI eHNjdMhmgh4H8eElwFYhBWMDz7DVBIKQRlwTVH3TkSm2OTn/jDtMd+YNYzrDd1bbzRt/ +zpTATLZ5g1VA2txbqZx/Q2x1FyMgbJ9aZi4UCBoOnO49hpwt5TjYJp8MYxY9nhuUQJv 3Jtw== 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=Wwx9Pc9RuyW05di+agpFWAxZgoOBYHnsqv6qtb+XC64=; b=z3YzE086heW3GeEeuBD8gu7igVxg6GJ0U03DwVylRsem/fpt81yMWp7hkOJLazmqt4 lJnQWhBWwPA3/mCF6AlfQi3FGyI+1CZD9kfrdjj5pb3iImYZ5I91EAfh4M2BEDTj7i++ rLojAniAXkAcizCy67Q0/kH9mLw+kvdHgGK2fPMZsKZhBSmXrwiLKwWH0WdkdZ4PvrGu N/H1zzY134GuDPvpDBdAIZvRkPSMj0aISOHNyNYiB89xvOHkEQOQMeNES6UxS0ABczZa XduknVps1M4qTDRQoyq2y+STRHWdwKi6Mxy6DVaTEJfA8NItLcwzOuVbTwQeJCwVfNpl st1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=E0fyMemE; 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 mu11si32033579pjb.16.2021.10.18.06.48.34; Mon, 18 Oct 2021 06:48:46 -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=E0fyMemE; 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 S233423AbhJRNtV (ORCPT + 99 others); Mon, 18 Oct 2021 09:49:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232453AbhJRNq7 (ORCPT ); Mon, 18 Oct 2021 09:46:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A2E2C617E4; Mon, 18 Oct 2021 13:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564175; bh=pYsevCUu8jha3GOL5a196ASdGCqRxsCwEI7LvYpseBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E0fyMemEC7wGdAcnYuXLyf7LnSjYaKULIekjz3hMFIgRPEPhyItDqeMeI1Zd98XVL GgyEuLS7RNnn+ALkHME/OJ9nBULBoPxTkLAzJIOWt1+e58rypDWsjWdRIm1fjDxsT6 QrWCqiz9Nx59uKkwjZuQyRfM+Y0dgQ/AvTEXwmw4= 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.10 094/103] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Date: Mon, 18 Oct 2021 15:25:10 +0200 Message-Id: <20211018132337.907089272@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132334.702559133@linuxfoundation.org> References: <20211018132334.702559133@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 @@ -464,7 +464,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;