summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorPengpeng Hou <pengpeng@iscas.ac.cn>2026-09-02 09:32:46 +0800
committerMark Brown <broonie@kernel.org>2026-09-24 23:47:46 +0100
commita5735b341c6e8cff5f5f9480295012a5ceebb665 (patch)
tree977b7849dc8fac561303174c0b58ab0fdd52cfe0 /sound/soc/codecs
parent3db3289178b94056753f7a8c6ee4ab4b232ee6a5 (diff)
downloadlinux-next-a5735b341c6e8cff5f5f9480295012a5ceebb665.tar.gz
linux-next-a5735b341c6e8cff5f5f9480295012a5ceebb665.zip
ASoC: rt1318: return cache sync errors from resume
rt1318_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: fe1ff61487ac ("ASoC: rt1318: Add RT1318 audio amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260902013256.93072-11-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/rt1318.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt1318.c b/sound/soc/codecs/rt1318.c
index 55607f1b9a1e..3dcec7564b82 100644
--- a/sound/soc/codecs/rt1318.c
+++ b/sound/soc/codecs/rt1318.c
@@ -1075,8 +1075,7 @@ static int rt1318_resume(struct snd_soc_component *component)
struct rt1318_priv *rt1318 = snd_soc_component_get_drvdata(component);
regcache_cache_only(rt1318->regmap, false);
- regcache_sync(rt1318->regmap);
- return 0;
+ return regcache_sync(rt1318->regmap);
}
#else
#define rt1318_suspend NULL