[PATCH] ASoC: es9356: Handle register cache sync failures on resume

From: Zhu Jun

Date: Thu Nov 19 2026 - 02:59:14 EST


The SoundWire resume callback reports success even if regcache_sync()
fails, leaving the codec with a partially restored register state.

Restore cache-only mode on a sync error and return the error to the
PM core.

Fixes: 5d9cb740cd38 ("ASoC: es9356-sdca: Add ES9356 SDCA driver")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/es9356.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/es9356.c b/sound/soc/codecs/es9356.c
index f2f658d8bc53..325744711943 100644
--- a/sound/soc/codecs/es9356.c
+++ b/sound/soc/codecs/es9356.c
@@ -1199,8 +1199,11 @@ static int es9356_sdca_dev_resume(struct device *dev)
}

regcache_cache_only(es9356->regmap, false);
- regcache_sync(es9356->regmap);
- return 0;
+ ret = regcache_sync(es9356->regmap);
+ if (ret)
+ regcache_cache_only(es9356->regmap, true);
+
+ return ret;
}

static const struct dev_pm_ops es9356_sdca_pm = {