[PATCH] ASoC: codecs: wsa884x: Propagate regcache_sync() errors

From: Pengpeng Hou

Date: Sat Jul 04 2026 - 03:26:50 EST


wsa884x_runtime_resume() leaves cache-only mode and replays cached
register state. It currently ignores regcache_sync() failures and
returns success.

Propagate the error and restore cache-only/dirty state on failure.

Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/wsa884x.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c
index 6c6b497657d0..567861dd42ad 100644
--- a/sound/soc/codecs/wsa884x.c
+++ b/sound/soc/codecs/wsa884x.c
@@ -2147,9 +2147,15 @@ static int wsa884x_runtime_suspend(struct device *dev)
static int wsa884x_runtime_resume(struct device *dev)
{
struct regmap *regmap = dev_get_regmap(dev, NULL);
+ int ret;

regcache_cache_only(regmap, false);
- regcache_sync(regmap);
+ ret = regcache_sync(regmap);
+ if (ret) {
+ regcache_cache_only(regmap, true);
+ regcache_mark_dirty(regmap);
+ return ret;
+ }

return 0;
}
--
2.43.0