ASoC: cs35l41: Handle mdsync_down reg write errors
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Thu, 7 Sep 2023 17:10:00 +0000 (20:10 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 11 Sep 2023 12:34:34 +0000 (13:34 +0100)
commita9a3f54a23d844971c274f352500dddeadb4412c
treeb12f9af6c4bf5f1f46f37594670dbf667ea278af
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
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>
sound/soc/codecs/cs35l41-lib.c