diff options
| author | Mark Brown <broonie@kernel.org> | 2026-09-24 23:47:51 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-24 23:47:51 +0100 |
| commit | 27f7c1ad8da626f1785db2ec234558d07120403b (patch) | |
| tree | 4654ac3921f868ec2011a7eb54a878f74b546b92 | |
| parent | b4136c0d69ead737197af741e20edd1c3574f6b4 (diff) | |
| parent | 9f2933d9a437302d5ae32eb9022efef049d8ab22 (diff) | |
| download | linux-next-27f7c1ad8da626f1785db2ec234558d07120403b.tar.gz linux-next-27f7c1ad8da626f1785db2ec234558d07120403b.zip | |
ASoC: codecs: propagate component resume cache sync failures
Pengpeng Hou <pengpeng@iscas.ac.cn> says:
Commit 951af101c730 ("ASoC: report component resume callback errors")
made negative component resume results visible through the existing ASoC
component error helper while preserving best-effort resume.
These 14 component resume callbacks still discard the final
regcache_sync() result and return success. Return that result so the common
wrapper can report a failed cache replay with component context. None of
these callbacks has dependent work after the sync, so the patches do not
add rollback or retry semantics and do not change the successful path.
The issues were found by a tool we developed.
GPT-5 assisted with source-history review, patch construction and
changelog drafting.
No dynamic reproducer was produced. The series was not built or tested on
codec hardware. The 14 patches were manually reviewed, checked with
checkpatch.pl and applied in order to sound/for-next at 27a50351cbc8.
The shared error-reporting contract was discussed at:
https://lore.kernel.org/r/20260825085239.82282-1-pengpeng@iscas.ac.cn
Link: https://patch.msgid.link/20260902013256.93072-1-pengpeng@iscas.ac.cn
| -rw-r--r-- | sound/soc/codecs/adau17x1.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/ak4642.c | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/es8316.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/es8323.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/nau8540.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt1011.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt1016.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt1305.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt1308.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt1318.c | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5616.c | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5659.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5660.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5665.c | 4 |
14 files changed, 14 insertions, 39 deletions
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c index 45ac226b2f1b..207189cfd3a6 100644 --- a/sound/soc/codecs/adau17x1.c +++ b/sound/soc/codecs/adau17x1.c @@ -1002,9 +1002,7 @@ int adau17x1_resume(struct snd_soc_component *component) if (adau->switch_mode) adau->switch_mode(component->dev); - regcache_sync(adau->regmap); - - return 0; + return regcache_sync(adau->regmap); } EXPORT_SYMBOL_GPL(adau17x1_resume); diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index cd92a1b3c371..a0de45660b00 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c @@ -539,8 +539,7 @@ static int ak4642_resume(struct snd_soc_component *component) struct regmap *regmap = dev_get_regmap(component->dev, NULL); regcache_cache_only(regmap, false); - regcache_sync(regmap); - return 0; + return regcache_sync(regmap); } static int ak4642_probe(struct snd_soc_component *component) { diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c index 5e7bf6f020e0..ded36a43065a 100644 --- a/sound/soc/codecs/es8316.c +++ b/sound/soc/codecs/es8316.c @@ -811,9 +811,7 @@ static int es8316_resume(struct snd_soc_component *component) struct es8316_priv *es8316 = snd_soc_component_get_drvdata(component); regcache_cache_only(es8316->regmap, false); - regcache_sync(es8316->regmap); - - return 0; + return regcache_sync(es8316->regmap); } static int es8316_suspend(struct snd_soc_component *component) diff --git a/sound/soc/codecs/es8323.c b/sound/soc/codecs/es8323.c index 3f7fbbdb111e..6a8d3902af23 100644 --- a/sound/soc/codecs/es8323.c +++ b/sound/soc/codecs/es8323.c @@ -737,9 +737,7 @@ static int es8323_resume(struct snd_soc_component *component) struct es8323_priv *es8323 = snd_soc_component_get_drvdata(component); regcache_cache_only(es8323->regmap, false); - regcache_sync(es8323->regmap); - - return 0; + return regcache_sync(es8323->regmap); } static const struct snd_soc_component_driver soc_component_dev_es8323 = { diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c index a939f4b7bb25..d4211a76b096 100644 --- a/sound/soc/codecs/nau8540.c +++ b/sound/soc/codecs/nau8540.c @@ -908,9 +908,7 @@ static int __maybe_unused nau8540_resume(struct snd_soc_component *component) struct nau8540 *nau8540 = snd_soc_component_get_drvdata(component); regcache_cache_only(nau8540->regmap, false); - regcache_sync(nau8540->regmap); - - return 0; + return regcache_sync(nau8540->regmap); } static const struct snd_soc_component_driver nau8540_component_driver = { diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index c140c079838d..dda38e6e56b6 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -2110,9 +2110,7 @@ static int rt1011_resume(struct snd_soc_component *component) struct rt1011_priv *rt1011 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt1011->regmap, false); - regcache_sync(rt1011->regmap); - - return 0; + return regcache_sync(rt1011->regmap); } #else #define rt1011_suspend NULL diff --git a/sound/soc/codecs/rt1016.c b/sound/soc/codecs/rt1016.c index 56a2f3d3354d..1e97d9ffa352 100644 --- a/sound/soc/codecs/rt1016.c +++ b/sound/soc/codecs/rt1016.c @@ -580,9 +580,7 @@ static int rt1016_resume(struct snd_soc_component *component) struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt1016->regmap, false); - regcache_sync(rt1016->regmap); - - return 0; + return regcache_sync(rt1016->regmap); } #else #define rt1016_suspend NULL diff --git a/sound/soc/codecs/rt1305.c b/sound/soc/codecs/rt1305.c index 92998ec0a392..0130ff9f050d 100644 --- a/sound/soc/codecs/rt1305.c +++ b/sound/soc/codecs/rt1305.c @@ -896,9 +896,7 @@ static int rt1305_resume(struct snd_soc_component *component) struct rt1305_priv *rt1305 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt1305->regmap, false); - regcache_sync(rt1305->regmap); - - return 0; + return regcache_sync(rt1305->regmap); } #else #define rt1305_suspend NULL diff --git a/sound/soc/codecs/rt1308.c b/sound/soc/codecs/rt1308.c index 28c25871ec0c..3d4aadb91206 100644 --- a/sound/soc/codecs/rt1308.c +++ b/sound/soc/codecs/rt1308.c @@ -715,9 +715,7 @@ static int rt1308_resume(struct snd_soc_component *component) struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt1308->regmap, false); - regcache_sync(rt1308->regmap); - - return 0; + return regcache_sync(rt1308->regmap); } #else #define rt1308_suspend NULL diff --git a/sound/soc/codecs/rt1318.c b/sound/soc/codecs/rt1318.c index 5f61de9e2ff9..5c80957b0f01 100644 --- a/sound/soc/codecs/rt1318.c +++ b/sound/soc/codecs/rt1318.c @@ -1075,8 +1075,7 @@ static int rt1318_resume(struct snd_soc_component *component) struct rt1318_priv *rt1318 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt1318->regmap, false); - regcache_sync(rt1318->regmap); - return 0; + return regcache_sync(rt1318->regmap); } #else #define rt1318_suspend NULL diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index e30e3b563c90..af6299baea7c 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1243,8 +1243,7 @@ static int rt5616_resume(struct snd_soc_component *component) struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt5616->regmap, false); - regcache_sync(rt5616->regmap); - return 0; + return regcache_sync(rt5616->regmap); } #else #define rt5616_suspend NULL diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 3d782f41ccdd..389be7cbfe05 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -3703,9 +3703,7 @@ static int rt5659_resume(struct snd_soc_component *component) struct rt5659_priv *rt5659 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt5659->regmap, false); - regcache_sync(rt5659->regmap); - - return 0; + return regcache_sync(rt5659->regmap); } #else #define rt5659_suspend NULL diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c index 807604120d28..2a3ecac12c07 100644 --- a/sound/soc/codecs/rt5660.c +++ b/sound/soc/codecs/rt5660.c @@ -1148,9 +1148,7 @@ static int rt5660_resume(struct snd_soc_component *component) msleep(350); regcache_cache_only(rt5660->regmap, false); - regcache_sync(rt5660->regmap); - - return 0; + return regcache_sync(rt5660->regmap); } #else #define rt5660_suspend NULL diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index 9545758f58d6..62b21092e352 100644 --- a/sound/soc/codecs/rt5665.c +++ b/sound/soc/codecs/rt5665.c @@ -4388,9 +4388,7 @@ static int rt5665_resume(struct snd_soc_component *component) struct rt5665_priv *rt5665 = snd_soc_component_get_drvdata(component); regcache_cache_only(rt5665->regmap, false); - regcache_sync(rt5665->regmap); - - return 0; + return regcache_sync(rt5665->regmap); } #else #define rt5665_suspend NULL |
