[PATCH] ASoC: codecs: lpass-va-macro: Propagate regcache_sync() errors
From: Pengpeng Hou
Date: Sat Jul 04 2026 - 03:40:45 EST
va_macro_runtime_resume() enables clocks, leaves cache-only mode, and
replays cached register state. It currently ignores regcache_sync()
failures and can report success.
Propagate sync failures, restore cache-only/dirty state, and unwind
clocks enabled by the resume path.
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
---
sound/soc/codecs/lpass-va-macro.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 528d5b167ecf..06793e880c84 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -1744,7 +1744,15 @@ static int va_macro_runtime_resume(struct device *dev)
}
regcache_cache_only(va->regmap, false);
- regcache_sync(va->regmap);
+ ret = regcache_sync(va->regmap);
+ if (ret) {
+ regcache_cache_only(va->regmap, true);
+ regcache_mark_dirty(va->regmap);
+ if (va->has_npl_clk)
+ clk_disable_unprepare(va->npl);
+ clk_disable_unprepare(va->mclk);
+ return ret;
+ }
return 0;
}
--
2.43.0