From aa7d985d85529049fc8c39c168b300f59de4fdf8 Mon Sep 17 00:00:00 2001 From: Pengpeng Hou Date: Sun, 6 Sep 2026 11:42:17 +0800 Subject: [PATCH] ASoC: fs210x: report register restore errors fs210x_init_chip() marks the register cache dirty and replays it after reset and scene setup, but ignores a replay failure and publishes is_inited. Its resume caller already returns the helper status. Keep is_inited clear and return a cache replay failure so the ASoC component wrapper can report the incomplete restoration. The issue was found by our static-analysis tool and manually reviewed. Fixes: 756117701779 ("ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260906034217.85696-5-hppiscas@163.com Signed-off-by: Mark Brown --- sound/soc/codecs/fs210x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/fs210x.c b/sound/soc/codecs/fs210x.c index 510cbeea5b62..316f3fe80d93 100644 --- a/sound/soc/codecs/fs210x.c +++ b/sound/soc/codecs/fs210x.c @@ -610,8 +610,9 @@ tag_power_down: if (!ret) { regcache_cache_only(fs210x->regmap, false); regcache_mark_dirty(fs210x->regmap); - regcache_sync(fs210x->regmap); - fs210x->is_inited = true; + ret = regcache_sync(fs210x->regmap); + if (!ret) + fs210x->is_inited = true; } return ret; -- knotmirror 0.0.1