From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Cc: arina.kharlamova@mbzuai.ac.ae,
David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Zhang Yi <zhangyi@everest-semi.com>,
Oder Chiou <oder_chiou@realtek.com>,
ChiYuan Huang <cy_huang@richtek.com>,
Srinivas Kandagatla <srini@kernel.org>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 1/6] ASoC: cs35l33: Disable runtime PM on component registration failure
Date: Wed, 2 Dec 2026 17:28:43 +0000 [thread overview]
Message-ID: <axBVSyG8Dp0xFnO9@opensource.cirrus.com> (raw)
In-Reply-To: <018844e2-adbc-4222-af55-e4e956818016@oss.qualcomm.com>
On Wed, Dec 02, 2026 at 10:03:09AM +0100, Konrad Dybcio wrote:
> On 12/1/26 8:07 PM, Arina Kharlamova via B4 Relay wrote:
> > From: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
> >
> > cs35l33_i2c_probe() enables runtime PM before it registers the
> > component, but the error path of the registration does not disable it
> > again. remove() is not called after a failed probe, so the next probe
> > warns about an unbalanced pm_runtime_enable().
> >
> > Disable runtime PM on that error path.
> >
> > Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.")
> > Signed-off-by: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
> > ---
> > sound/soc/codecs/cs35l33.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
> > index 40a3a7449a66..f3d0843fb5fd 100644
> > --- a/sound/soc/codecs/cs35l33.c
> > +++ b/sound/soc/codecs/cs35l33.c
> > @@ -1245,6 +1245,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client)
> > if (ret < 0) {
> > dev_err(&i2c_client->dev, "%s: Register component failed\n",
> > __func__);
> > + pm_runtime_disable(&i2c_client->dev);
>
> Let's instead switch to the devres flavor - devm_pm_runtime_enable()
This might lead to unbalanced disables for the regulators. A
naive implementation would the pm_runtime_disable() to after the
regulator_bulk_disable() on the error path. So converting it over
to devm_ might require a few extra changes. Happy to go with either
approach personally, but less simple than it looks to use devm.
Thanks,
Charles
next prev parent reply other threads:[~2026-12-02 17:30 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 19:06 [PATCH 0/6] ASoC: codecs: Fix runtime PM handling on probe failure and unbind Arina Kharlamova
2026-12-01 19:06 ` Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 1/6] ASoC: cs35l33: Disable runtime PM on component registration failure Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-02 9:03 ` Konrad Dybcio
2026-12-02 17:28 ` Charles Keepax [this message]
2026-12-01 19:07 ` [PATCH 2/6] ASoC: cs35l34: " Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 3/6] ASoC: cs47l24: Disable runtime PM on probe failure Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 4/6] ASoC: es9356: disable runtime PM in remove unconditionally Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-01 19:22 ` sashiko-bot
2026-12-01 19:07 ` [PATCH 5/6] ASoC: codecs: rtq9128: Drop runtime PM reference on probe errors Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-02 1:31 ` ChiYuan Huang
2026-12-02 9:04 ` Konrad Dybcio
2026-12-01 19:07 ` [PATCH 6/6] ASoC: codecs: wsa881x: Disable runtime PM on unbind Arina Kharlamova
2026-12-01 19:07 ` Arina Kharlamova via B4 Relay
2026-12-02 9:05 ` Konrad Dybcio
2026-12-02 9:18 ` Srinivas Kandagatla
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=axBVSyG8Dp0xFnO9@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=arina.kharlamova@mbzuai.ac.ae \
--cc=broonie@kernel.org \
--cc=cy_huang@richtek.com \
--cc=david.rhodes@cirrus.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
--cc=zhangyi@everest-semi.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 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.