public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Wangshaobo (bobo)" <bobo.shaobowang@huawei.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "chengjian (D)" <cj.chengjian@huawei.com>,
	"liwei (GF)" <liwei391@huawei.com>,
	"antoniu.miclaus@analog.com" <antoniu.miclaus@analog.com>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	"Wangshaobo (bobo)" <bobo.shaobowang@huawei.com>
Subject: 答复: [PATCH 2/2] iio:filter:admv8818: Fix missing clk_disable_unprepare() in admv8818_clk_setup
Date: Fri, 18 Mar 2022 03:29:50 +0000	[thread overview]
Message-ID: <ecbd85c40bce45078658a63bbd8b0a50@huawei.com> (raw)
In-Reply-To: <20220318025914.2614812-3-bobo.shaobowang@huawei.com>


-----邮件原件-----
发件人: Wangshaobo (bobo) 
发送时间: 2022年3月18日 10:59
抄送: chengjian (D) <cj.chengjian@huawei.com>; liwei (GF) <liwei391@huawei.com>; Wangshaobo (bobo) <bobo.shaobowang@huawei.com>; antoniu.miclaus@analog.com; linux-iio@vger.kernel.org; linux-kernel@vger.kernel.org; jic23@kernel.org; Jonathan Cameron <jonathan.cameron@huawei.com>
主题: [PATCH 2/2] iio:filter:admv8818: Fix missing clk_disable_unprepare() in admv8818_clk_setup

Fix missing clk_disable_unprepare() before return from admv8818_clk_setup in the error handling cases.

Fixes: f34fe888ad05 ("iio:filter:admv8818: add support for ADMV8818")
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
---
 drivers/iio/filter/admv8818.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/filter/admv8818.c b/drivers/iio/filter/admv8818.c index 68de45fe21b4..acb436efd8b5 100644
--- a/drivers/iio/filter/admv8818.c
+++ b/drivers/iio/filter/admv8818.c
@@ -590,14 +590,22 @@ static int admv8818_clk_setup(struct admv8818_state *st)
 
 	ret = devm_add_action_or_reset(&spi->dev, admv8818_clk_disable, st);
 	if (ret)
-		return ret;
+		goto out_clk_disable;

admv8818_clk_disable() would do clk_disable_unprepare(), so clk_disable_unprepare() is not needed after
devm_add_action_or_reset(),there is no problem in this function.

this patch is not needed anymore.

-- wangshaobo

      reply	other threads:[~2022-03-18  3:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  2:59 [PATCH 0/2] admv8818 driver fixes Wang ShaoBo
2022-03-18  2:59 ` [PATCH 1/2] iio:filter:admv8818: Add depends on REGMAP Wang ShaoBo
2022-03-18  8:45   ` Sa, Nuno
2022-03-20  5:32     ` Wangshaobo (bobo)
2022-03-18  2:59 ` [PATCH 2/2] iio:filter:admv8818: Fix missing clk_disable_unprepare() in admv8818_clk_setup Wang ShaoBo
2022-03-18  3:29   ` Wangshaobo (bobo) [this message]

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=ecbd85c40bce45078658a63bbd8b0a50@huawei.com \
    --to=bobo.shaobowang@huawei.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=cj.chengjian@huawei.com \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox