mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: codecs: rt721-sdca-sdw: Propagate regcache_sync() errors
rt721_sdca_dev_resume() clears cache-only mode for both regmaps and replays cached register state. Both regcache_sync() calls currently ignore their return values. Check both sync operations, return the first error, and restore both regmaps to cache-only/dirty state on failure. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260704073758.37156-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ba8c728e75
commit
7a08868263
|
|
@ -510,10 +510,23 @@ static int rt721_sdca_dev_resume(struct device *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
regcache_cache_only(rt721->regmap, false);
|
regcache_cache_only(rt721->regmap, false);
|
||||||
regcache_sync(rt721->regmap);
|
ret = regcache_sync(rt721->regmap);
|
||||||
|
if (ret)
|
||||||
|
goto err_sync;
|
||||||
|
|
||||||
regcache_cache_only(rt721->mbq_regmap, false);
|
regcache_cache_only(rt721->mbq_regmap, false);
|
||||||
regcache_sync(rt721->mbq_regmap);
|
ret = regcache_sync(rt721->mbq_regmap);
|
||||||
|
if (ret)
|
||||||
|
goto err_sync;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
err_sync:
|
||||||
|
regcache_cache_only(rt721->regmap, true);
|
||||||
|
regcache_cache_only(rt721->mbq_regmap, true);
|
||||||
|
regcache_mark_dirty(rt721->regmap);
|
||||||
|
regcache_mark_dirty(rt721->mbq_regmap);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops rt721_sdca_pm = {
|
static const struct dev_pm_ops rt721_sdca_pm = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user