[PATCH 01/14] ASoC: adau17x1: return cache sync errors from resume

From: Pengpeng Hou

Date: Tue Sep 01 2026 - 21:37:31 EST


adau17x1_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 optional switch-mode callback remains ordered before the cache
replay.

The issue was found by a tool we developed.

Fixes: 4101866c743a ("ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/adau17x1.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index 26d7eb437ad1..00efaff44e92 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -989,9 +989,7 @@ int adau17x1_resume(struct snd_soc_component *component)
if (adau->switch_mode)
adau->switch_mode(component->dev);

- regcache_sync(adau->regmap);
-
- return 0;
+ return regcache_sync(adau->regmap);
}
EXPORT_SYMBOL_GPL(adau17x1_resume);

--
2.50.1 (Apple Git-155)