diff options
| author | Hsieh Hung-En <hungen3108@gmail.com> | 2026-04-15 11:02:51 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-04-16 13:39:09 +0100 |
| commit | 37e9faf21670cf86d36eebc3b4d27afe6819983a (patch) | |
| tree | 8f5de1d2c70bb01f952bb1bbb23167e15c7ab927 /sound | |
| parent | 6e5b0fac1063ba0b3c0e3fe1c605f95a3f45d440 (diff) | |
ASoC: es8311: Check regcache_sync() error in resume
The es8311_resume() function currently ignores the return value of
regcache_sync(). If syncing the cache fails, the function still returns
0, leaving the codec in a potentially incorrect state.
Check the return value and propagate it to the ASoC core to ensure
resume failures are properly handled.
Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
Link: https://patch.msgid.link/20260415030252.5547-2-hungen3108@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/codecs/es8311.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/es8311.c b/sound/soc/codecs/es8311.c index 0b07a53cc792..9e371e2d6eae 100644 --- a/sound/soc/codecs/es8311.c +++ b/sound/soc/codecs/es8311.c @@ -862,13 +862,18 @@ static int es8311_suspend(struct snd_soc_component *component) static int es8311_resume(struct snd_soc_component *component) { struct es8311_priv *es8311; + int ret; es8311 = snd_soc_component_get_drvdata(component); es8311_reset(component, false); regcache_cache_only(es8311->regmap, false); - regcache_sync(es8311->regmap); + ret = regcache_sync(es8311->regmap); + if (ret) { + dev_err(component->dev, "unable to sync regcache\n"); + return ret; + } return 0; } |
