[PATCH] ASoC: codecs: rt722-sdca-sdw: Propagate regcache_sync() errors
From: Pengpeng Hou
Date: Sat Jul 04 2026 - 03:44:26 EST
rt722_sdca_dev_resume() waits for SoundWire initialization, 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/rt722-sdca-sdw.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index e68aa0350a5b..d2db33b4f684 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -557,7 +557,13 @@ static int rt722_sdca_dev_resume(struct device *dev)
}
regcache_cache_only(rt722->regmap, false);
- regcache_sync(rt722->regmap);
+ ret = regcache_sync(rt722->regmap);
+ if (ret) {
+ regcache_cache_only(rt722->regmap, true);
+ regcache_mark_dirty(rt722->regmap);
+ return ret;
+ }
+
return 0;
}
--
2.43.0