mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 03:52:02 +02:00
ASoC: codecs: rt1318-sdw: Propagate regcache_sync() errors
regcache_sync() can fail while replaying cached register state after the SoundWire slave has reinitialized. rt1318_dev_resume() currently ignores that failure 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/20260704035437.57792-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
49ea357ea7
commit
2c5e237e7e
|
|
@ -830,7 +830,12 @@ static int rt1318_dev_resume(struct device *dev)
|
|||
return ret;
|
||||
|
||||
regcache_cache_only(rt1318->regmap, false);
|
||||
regcache_sync(rt1318->regmap);
|
||||
ret = regcache_sync(rt1318->regmap);
|
||||
if (ret) {
|
||||
regcache_cache_only(rt1318->regmap, true);
|
||||
regcache_mark_dirty(rt1318->regmap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user