Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3008667pxb; Mon, 18 Oct 2021 06:31:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/ybMiw0pQOSqGNv+wTsRNoKChxEqsZnKMTnCFx3S90GCDpfJKvL9f9xdhX4Qe7rPQXU3Y X-Received: by 2002:a62:79d7:0:b0:44c:a583:e5d7 with SMTP id u206-20020a6279d7000000b0044ca583e5d7mr28391699pfc.2.1634563879258; Mon, 18 Oct 2021 06:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634563879; cv=none; d=google.com; s=arc-20160816; b=lwuO5vmrgmjHgoJpP4sVBhyEAYHVirzSqtxZYekarRF8VLr6oSpAf0z38N6dF+cCOK E+wQLXCsyOm3cVXu8dqvVS6PUvHnnBcq5d6w2amKJPhPzOCfY4qbRyRBb2M09XNLxvY+ NM24szy8ooUXLYg6WSsidBU2MqsNVELG/IKfKJcJmZmhV/NfuACB807TCwo65MTTf+OH OdjC3RiQbhFmn77nFAHzFaJFEs2OhXw2ozQ6N1Sg/dWtTzpnENVGKXSoimKePmE+CFBq 9ruF1uORL8inhGdtK5O5YCvKt/2KBDyxcx4ogONkEgAv2o7ayc8jKzEK60PRF0Y0TxEA nSAw== 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=Q4vJ8+OwBwX/Yzh3rAGfeX+bUVAtaVsHa2PxiFI+nx4=; b=JCl1CnDYo/gQokqR98o7TXkDDH4QiLc+t48KbsMWx/jjXgssoyAbWLQA1tea3v/Qxd UoBQv/lMf75y9mop0emauMceayAqmyFrOnONLaCxM/gSLKgJish4l1kw2TAC5jLPY4Zl hlWoVjoWjhwvUTSfMDJhbLOND4cw3mYUcJX+OkaSo7hVlIKiA2250a0UjrLpNjLNevR6 kTHX5WeMGFW88Nse7uXQi7rI3CqJ7PdLzYgsduAxtCW2iB6QlMz8/hSdQMC2mcH3F+7/ AkYoMdfWNtYmoiaKKwj0Nw5QPxH2GMOmBr+cSFu7Ystc+96IXku2AQ6r3wnjq2jv2mpe 078Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UYmv8Pep; 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 w70si20543183pgd.322.2021.10.18.06.31.06; Mon, 18 Oct 2021 06:31:19 -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=UYmv8Pep; 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 S232037AbhJRNaz (ORCPT + 99 others); Mon, 18 Oct 2021 09:30:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:41422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231944AbhJRN3Z (ORCPT ); Mon, 18 Oct 2021 09:29:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F150D610A6; Mon, 18 Oct 2021 13:27:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563634; bh=C2RPkzixyaNcGVj03lzWbgDunOp2osk6YocFI6dRBVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UYmv8PepNTTNoNdtcKVSoDynRaB15fehpLOOvCNorCJN+wjciagMTdG/IQxXddksA b0b9hfzWJ2fogdxou7VTnQEwAVKuDJ5sZ6Ch/qBi5n1hC4eNwpKbQie0Ie7trbG+a6 JZaq6m2FhFurjr4PpsxSp+DYbjvsIZq2fmBkIFoA= 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.14 36/39] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling Date: Mon, 18 Oct 2021 15:24:45 +0200 Message-Id: <20211018132326.594547790@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132325.426739023@linuxfoundation.org> References: <20211018132325.426739023@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 @@ -442,7 +442,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;