diff options
author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2023-09-07 20:10:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-09-11 13:34:34 +0100 |
commit | a9a3f54a23d844971c274f352500dddeadb4412c (patch) | |
tree | b12f9af6c4bf5f1f46f37594670dbf667ea278af | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) | |
download | lwn-a9a3f54a23d844971c274f352500dddeadb4412c.tar.gz lwn-a9a3f54a23d844971c274f352500dddeadb4412c.zip |
ASoC: cs35l41: Handle mdsync_down reg write errors
The return code of regmap_multi_reg_write() call related to "MDSYNC
down" sequence is shadowed by the subsequent
wait_for_completion_timeout() invocation, which is expected to time
timeout in case the write operation failed.
Let cs35l41_global_enable() return the correct error code instead of
-ETIMEDOUT.
Fixes: f5030564938b ("ALSA: cs35l41: Add shared boost feature")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230907171010.1447274-2-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/cs35l41-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/cs35l41-lib.c b/sound/soc/codecs/cs35l41-lib.c index 4ec306cd2f47..a018f1d98428 100644 --- a/sound/soc/codecs/cs35l41-lib.c +++ b/sound/soc/codecs/cs35l41-lib.c @@ -1243,7 +1243,7 @@ int cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l4 cs35l41_mdsync_down_seq[2].def = pwr_ctrl1; ret = regmap_multi_reg_write(regmap, cs35l41_mdsync_down_seq, ARRAY_SIZE(cs35l41_mdsync_down_seq)); - if (!enable) + if (ret || !enable) break; if (!pll_lock) |