[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aS7z9D5upyOmAgmz@smile.fi.intel.com>
Date: Tue, 2 Dec 2025 16:13:08 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Shengjiu Wang <shengjiu.wang@....com>
Cc: lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
kuninori.morimoto.gx@...esas.com, nichen@...as.ac.cn,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
ckeepax@...nsource.cirrus.com
Subject: Re: [PATCH 1/2] ASoC: ak4458: Disable regulator when error happens
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
Powered by blists - more mailing lists