diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-04 15:24:54 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-09 16:57:39 +0100 |
| commit | cc5c698bbca05d0467239c5d7aa7ec8697b77ab2 (patch) | |
| tree | 1d49d00bd4af23f47844acdce894590e98faa559 | |
| parent | 495d266f67f46e4ef0497c98a1588be43a39f95e (diff) | |
| download | linux-cc5c698bbca05d0467239c5d7aa7ec8697b77ab2.tar.gz linux-cc5c698bbca05d0467239c5d7aa7ec8697b77ab2.zip | |
ASoC: codecs: wsa883x: Propagate regcache_sync() errors
wsa883x_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@iscas.ac.cn>
Link: https://patch.msgid.link/20260704072454.80981-1-pengpeng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/wsa883x.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index 468d2b38a22a..24a5904d8e6c 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -1696,9 +1696,15 @@ static int wsa883x_runtime_suspend(struct device *dev) static int wsa883x_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; } |
