[PATCH 13/14] ASoC: rt5660: return cache sync errors from resume

From: Pengpeng Hou

Date: Tue Sep 01 2026 - 21:40:06 EST


rt5660_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 power-off resume delay remains ordered before the cache replay.

The issue was found by a tool we developed.

Fixes: 2b26dd4c1fc5 ("ASoC: rt5660: add rt5660 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/rt5660.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c
index edf2e3e346e4..830498c947e0 100644
--- a/sound/soc/codecs/rt5660.c
+++ b/sound/soc/codecs/rt5660.c
@@ -1148,9 +1148,7 @@ static int rt5660_resume(struct snd_soc_component *component)
msleep(350);

regcache_cache_only(rt5660->regmap, false);
- regcache_sync(rt5660->regmap);
-
- return 0;
+ return regcache_sync(rt5660->regmap);
}
#else
#define rt5660_suspend NULL
--
2.50.1 (Apple Git-155)