Linux I2C development
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Ruoyu Wang <ruoyuw560@gmail.com>
Cc: linux-i2c@vger.kernel.org, peter@korsgaard.com, andrew@lunn.ch,
	 jcmvbkbc@gmail.com, wsa@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: ocores: Disable clock on failed resume
Date: Fri, 14 Aug 2026 23:47:37 +0200	[thread overview]
Message-ID: <an-MW3uW-o5tPpiT@zenone.zhora.eu> (raw)
In-Reply-To: <20260813153155.3953577-1-ruoyuw560@gmail.com>

Hi Ruoyu,

On Thu, Aug 13, 2026 at 11:31:55PM +0800, Ruoyu Wang wrote:
> ocores_i2c_resume() enables the controller clock before reinitializing
> the hardware. If the clock rate changed while the device was suspended,
> ocores_init() may reject the resulting prescaler. The callback then
> returns an error with the clock still enabled, while the controller
> itself remains disabled.
> 
> Disable and unprepare the clock when ocores_init() fails so the failed
> resume path balances the successful clk_prepare_enable() call.
> 
> This issue was found by a static analysis checker and confirmed by manual
> source review.
> 
> Fixes: e961a094afe0 ("i2c: ocores: add common clock support")
> Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>

merged to i2c/i2c-2.

Thanks,
Andi

      parent reply	other threads:[~2026-08-14 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 15:31 [PATCH] i2c: ocores: Disable clock on failed resume Ruoyu Wang
2026-08-13 21:34 ` Max Filippov
2026-08-14 21:47 ` Andi Shyti [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=an-MW3uW-o5tPpiT@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@korsgaard.com \
    --cc=ruoyuw560@gmail.com \
    --cc=wsa@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