All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>
Cc: <bjorn.andersson@linaro.org>
Subject: [PATCH -next] bus: qcom: Add missing clk_disable_unprepare() on error path
Date: Mon, 17 May 2021 19:09:22 +0800	[thread overview]
Message-ID: <20210517110922.474849-1-yangyingliang@huawei.com> (raw)

After calling clk_prepare_enable(), clk_disable_unprepare() need
be called when read csindex failed.

Fixes: 335a12754808 ("bus: qcom: add EBI2 driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/bus/qcom-ebi2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c
index 0b8f53a688b8..3cffac13bc5f 100644
--- a/drivers/bus/qcom-ebi2.c
+++ b/drivers/bus/qcom-ebi2.c
@@ -355,7 +355,7 @@ static int qcom_ebi2_probe(struct platform_device *pdev)
 		ret = of_property_read_u32(child, "reg", &csindex);
 		if (ret) {
 			of_node_put(child);
-			return ret;
+			goto err_disable_clk;
 		}
 
 		if (csindex > 5) {
-- 
2.25.1


                 reply	other threads:[~2021-05-17 11:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210517110922.474849-1-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.