[PATCH 07/20] ASoC: max98088: Propagate cache replay errors from bias restore
From: Pengpeng Hou
Date: Fri Aug 28 2026 - 07:35:10 EST
max98088_set_bias_level() replays cached registers during the
OFF-to-STANDBY transition but ignores failure and enables additional
power bits.
Return the replay error before those writes and keep the cache dirty for
a later retry.
The issue was identified via static analysis and manually reviewed.
Fixes: e86e1244a413 ("ASoC: Restore MAX98088 CODEC driver")
Assisted-by: LLM
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/max98088.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index df438baf05dc..b1e7a03f3408 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1323,8 +1323,13 @@ static int max98088_set_bias_level(struct snd_soc_component *component,
break;
case SND_SOC_BIAS_STANDBY:
- if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF)
- regcache_sync(max98088->regmap);
+ if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) {
+ ret = regcache_sync(max98088->regmap);
+ if (ret) {
+ regcache_mark_dirty(max98088->regmap);
+ return ret;
+ }
+ }
snd_soc_component_update_bits(component, M98088_REG_4C_PWR_EN_IN,
M98088_MBEN, M98088_MBEN);
--
2.43.0