[PATCH 02/14] ASoC: ak4642: return cache sync errors from resume
From: Pengpeng Hou
Date: Tue Sep 01 2026 - 21:34:04 EST
ak4642_resume() restores cached registers during component resume but
discards the regcache_sync() result and returns success. A failed replay
can therefore leave the hardware register state stale without reaching
the component error reporting path.
Return the cache synchronization result. The ASoC component wrapper
reports a negative callback result and retains the established
best-effort resume state, so this adds observability without introducing
rollback or retry semantics.
The successful resume path is unchanged.
The issue was found by a tool we developed.
Fixes: a3a83d9a7cb0 ("ASoC: Add ak4642/ak4643 codec support")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/ak4642.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 4f86728cbe0a..40f1b1f53e84 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -533,8 +533,7 @@ static int ak4642_resume(struct snd_soc_component *component)
struct regmap *regmap = dev_get_regmap(component->dev, NULL);
regcache_cache_only(regmap, false);
- regcache_sync(regmap);
- return 0;
+ return regcache_sync(regmap);
}
static int ak4642_probe(struct snd_soc_component *component)
{
--
2.50.1 (Apple Git-155)