[PATCH 02/20] ASoC: adau1701: Propagate register cache replay errors
From: Pengpeng Hou
Date: Fri Aug 28 2026 - 07:36:39 EST
adau1701_reset() marks the cache dirty after firmware and reset setup
but ignores regcache_sync(). The hw_params and component probe callers
return the helper status, so they can currently accept reset completion
while cached register state was not restored.
Return the cache replay error so those effective callers stop the
transition.
The issue was identified via static analysis and manually reviewed.
Fixes: 45405d58924f ("ASoC: adau1701: switch to direct regmap API usage")
Assisted-by: LLM
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/adau1701.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 329ab01b62c0..a5c2d095a0ab 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -355,7 +355,9 @@ static int adau1701_reset(struct snd_soc_component *component, unsigned int clkd
regmap_write(adau1701->regmap, ADAU1701_DSPCTRL, ADAU1701_DSPCTRL_CR);
regcache_mark_dirty(adau1701->regmap);
- regcache_sync(adau1701->regmap);
+ ret = regcache_sync(adau1701->regmap);
+ if (ret)
+ return ret;
return 0;
}
--
2.43.0