[PATCH 07/14] ASoC: rt1016: return cache sync errors from resume

From: Pengpeng Hou

Date: Tue Sep 01 2026 - 21:36:36 EST


rt1016_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: 79a4b670b4b4 ("ASoC: rt1016: Add the rt1016 support")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/rt1016.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c
index 11c8c45574a1..12b97c04d033 100644
--- a/sound/soc/codecs/rt1016.c
+++ b/sound/soc/codecs/rt1016.c
@@ -570,9 +570,7 @@ static int rt1016_resume(struct snd_soc_component *component)
struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);

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