public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: Gaosheng Cui <cuigaosheng1@huawei.com>, andi.shyti@kernel.org
Cc: linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH -next] i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runti
Date: Mon, 5 Aug 2024 00:21:53 +0300	[thread overview]
Message-ID: <a12d2ec6-07b1-4577-8bed-981024c5cc9c@linaro.org> (raw)
In-Reply-To: <20240803061041.283940-1-cuigaosheng1@huawei.com>

On 8/3/24 09:10, Gaosheng Cui wrote:
> Add the missing clk_disable_unprepare() before return in
> geni_i2c_runti().

The function name above is scrambled, it should be geni_i2c_runtime_resume().

> 
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
> ---
>   drivers/i2c/busses/i2c-qcom-geni.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 0a8b95ce35f7..78f43648e9f3 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -990,8 +990,10 @@ static int __maybe_unused geni_i2c_runtime_resume(struct device *dev)
>   		return ret;
>   
>   	ret = geni_se_resources_on(&gi2c->se);
> -	if (ret)
> +	if (ret) {
> +		clk_disable_unprepare(gi2c->core_clk);
>   		return ret;
> +	}
>   
>   	enable_irq(gi2c->irq);
>   	gi2c->suspended = 0;

The fix is correct, thank you.

FWIW there is another missed call of geni_icc_disable(&gi2c->se) on the error paths.

Fixes: 14d02fbadb5d ("i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant")
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>

--
Best wishes,
Vladimir

  reply	other threads:[~2024-08-04 21:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03  6:10 [PATCH -next] i2c: qcom-geni: Add missing clk_disable_unprepare in geni_i2c_runti Gaosheng Cui
2024-08-04 21:21 ` Vladimir Zapolskiy [this message]
2024-08-05 17:11   ` Andi Shyti
2024-08-06 12:55     ` cuigaosheng

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=a12d2ec6-07b1-4577-8bed-981024c5cc9c@linaro.org \
    --to=vladimir.zapolskiy@linaro.org \
    --cc=andi.shyti@kernel.org \
    --cc=cuigaosheng1@huawei.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox