Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, kuninori.morimoto.gx@renesas.com,
	nichen@iscas.ac.cn, linux-sound@vger.kernel.org,
	linux-kernel@vger.kernel.org, ckeepax@opensource.cirrus.com
Subject: Re: [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens
Date: Tue, 2 Dec 2025 16:13:08 +0200	[thread overview]
Message-ID: <aS7z9D5upyOmAgmz@smile.fi.intel.com> (raw)
In-Reply-To: <20251202083535.1985714-2-shengjiu.wang@nxp.com>

On Tue, Dec 02, 2025 at 04:35:34PM +0800, Shengjiu Wang wrote:
> Disable regulator in runtime resume when error happens to balance
> the reference count of regulator.

...

> -	return regcache_sync(ak4458->regmap);
> +	ret = regcache_sync(ak4458->regmap);
> +	if (ret)
> +		goto err;
> +
> +	return 0;
> +err:
> +	regulator_bulk_disable(ARRAY_SIZE(ak4458->supplies), ak4458->supplies);
> +	return ret;

	ret = regcache_sync(ak4458->regmap);
	if (ret)
		regulator_bulk_disable(ARRAY_SIZE(ak4458->supplies), ak4458->supplies);

	return ret;

is also okay in this case.

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2025-12-02 14:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  8:35 [PATCH 0/2] ASoC: ak4458 & ak5558: disable regulator if error Shengjiu Wang
2025-12-02  8:35 ` [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens Shengjiu Wang
2025-12-02 13:37   ` Mark Brown
2025-12-03  6:09     ` Shengjiu Wang
2025-12-02 14:13   ` Andy Shevchenko [this message]
2025-12-02  8:35 ` [PATCH 2/2] ASoC: ak5558: " Shengjiu Wang

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=aS7z9D5upyOmAgmz@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@nxp.com \
    --cc=tiwai@suse.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