Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: ChiYuan Huang <cy_huang@richtek.com>
To: <arina.kharlamova@mbzuai.ac.ae>
Cc: 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>,
	Charles Keepax <ckeepax@opensource.cirrus.com>,
	Zhang Yi <zhangyi@everest-semi.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	Srinivas Kandagatla <srini@kernel.org>,
	<linux-sound@vger.kernel.org>, <patches@opensource.cirrus.com>,
	<linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH 5/6] ASoC: codecs: rtq9128: Drop runtime PM reference on probe errors
Date: Wed, 2 Dec 2026 09:31:57 +0800	[thread overview]
Message-ID: <aw91DaoQkWaa3oLP@git-send.richtek.com> (raw)
In-Reply-To: <20261201-s2p-asoc-rpm-v1-5-477189293ad4@mbzuai.ac.ae>

On Tue, Dec 01, 2026 at 11:07:04PM +0400, Arina Kharlamova via B4 Relay wrote:
> From: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>
> 
> rtq9128_component_probe() takes a runtime PM reference with
> pm_runtime_resume_and_get() and then writes the init table and, for
> RTQ9154, the AUTO ULQM register. If one of these
> snd_soc_component_write() calls fails, the function returns without
> calling pm_runtime_put(). The usage count stays raised and the device
> cannot runtime suspend.
> 
> Leave through a common exit that drops the reference on these error
> paths as well.
> 
> Fixes: 736064c64cf3 ("ASoC: codecs: Add Richtek rtq9128 audio amplifier support")
> Fixes: 6be9ea62afed ("ASoC: codecs: rtq9128: Add compatible changes for rtq9154")
> Signed-off-by: Arina Kharlamova <arina.kharlamova@mbzuai.ac.ae>

Reviewed-by: ChiYuan Huang <cy_huang@richtek.com>

ChiYuan
> ---
>  sound/soc/codecs/rtq9128.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c
> index a6d4a81ff181..8635ccba39a5 100644
> --- a/sound/soc/codecs/rtq9128.c
> +++ b/sound/soc/codecs/rtq9128.c
> @@ -484,7 +484,7 @@ static int rtq9128_component_probe(struct snd_soc_component *comp)
>  	for (i = 0, curr = table; i < table_size; i++, curr++) {
>  		ret = snd_soc_component_write(comp, curr->reg, curr->val);
>  		if (ret < 0)
> -			return ret;
> +			goto out_put;
>  	}
>  
>  
> @@ -492,13 +492,14 @@ static int rtq9128_component_probe(struct snd_soc_component *comp)
>  		/* Enable RTQ9154 Specific AUTO ULQM feature */
>  		ret = snd_soc_component_write(comp, RTQ9154_REG_AUTOULQM, RTQ9154_AUTOULQM_VAL);
>  		if (ret < 0)
> -			return ret;
> +			goto out_put;
>  	}
>  
> +out_put:
>  	pm_runtime_mark_last_busy(comp->dev);
>  	pm_runtime_put(comp->dev);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  static const struct snd_soc_component_driver rtq9128_comp_driver = {
> 
> -- 
> Git-157)
> 
> 

  reply	other threads:[~2026-12-02  1:36 UTC|newest]

Thread overview: 8+ 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 via B4 Relay
2026-12-01 19:07 ` [PATCH 1/6] ASoC: cs35l33: Disable runtime PM on component registration failure Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 2/6] ASoC: cs35l34: " Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 3/6] ASoC: cs47l24: Disable runtime PM on probe failure Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 4/6] ASoC: es9356: disable runtime PM in remove unconditionally Arina Kharlamova via B4 Relay
2026-12-01 19:07 ` [PATCH 5/6] ASoC: codecs: rtq9128: Drop runtime PM reference on probe errors Arina Kharlamova via B4 Relay
2026-12-02  1:31   ` ChiYuan Huang [this message]
2026-12-01 19:07 ` [PATCH 6/6] ASoC: codecs: wsa881x: Disable runtime PM on unbind Arina Kharlamova via B4 Relay

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=aw91DaoQkWaa3oLP@git-send.richtek.com \
    --to=cy_huang@richtek.com \
    --cc=arina.kharlamova@mbzuai.ac.ae \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox