[PATCH 11/14] ASoC: rt5616: return cache sync errors from resume
From: Pengpeng Hou
Date: Tue Sep 01 2026 - 21:36:33 EST
rt5616_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: b1d15059957d ("ASoC: rt5616: add rt5616 codec driver")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/rt5616.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 46ee412dc81d..73a3d1d008f4 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1248,8 +1248,7 @@ static int rt5616_resume(struct snd_soc_component *component)
struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt5616->regmap, false);
- regcache_sync(rt5616->regmap);
- return 0;
+ return regcache_sync(rt5616->regmap);
}
#else
#define rt5616_suspend NULL
--
2.50.1 (Apple Git-155)