summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/madera.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2020-01-14 16:18:40 +0000
committerMark Brown <broonie@kernel.org>2020-01-17 15:30:06 +0000
commit4061fdc89ff7704a71dc6df8e5841f861138e7e1 (patch)
tree63d5836e1a8c3ac4a1189cea03b6f51dc7beb189 /sound/soc/codecs/madera.c
parentdf4e3eee310fb66e5f17aa651183b94d0d152650 (diff)
ASoC: madera: Correct error path handling in madera_out1_demux_put
Should the write to MADERA_OUTPUT_ENABLES_1 fail and out_clamp[0] not be set an additional error message will be printed. Clear the ret variable to avoid this. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200114161841.451-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/madera.c')
-rw-r--r--sound/soc/codecs/madera.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index 12dc468ae6bf..2be64422adf9 100644
--- a/sound/soc/codecs/madera.c
+++ b/sound/soc/codecs/madera.c
@@ -575,6 +575,7 @@ int madera_out1_demux_put(struct snd_kcontrol *kcontrol,
usleep_range(2000, 3000); /* wait for wseq to complete */
/* change demux setting */
+ ret = 0;
if (madera->out_clamp[0])
ret = regmap_update_bits(madera->regmap,
MADERA_OUTPUT_ENABLES_1,