diff mbox series

[3/4] ASoC: madera: Correct error path handling in madera_out1_demux_put

Message ID 20200114161841.451-3-ckeepax@opensource.cirrus.com (mailing list archive)
State Accepted
Commit 4061fdc89ff7704a71dc6df8e5841f861138e7e1
Headers show
Series [1/4] ASoC: wm_adsp: Correct cache handling of new kernel control API | expand

Commit Message

Charles Keepax Jan. 14, 2020, 4:18 p.m. UTC
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>
---
 sound/soc/codecs/madera.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/sound/soc/codecs/madera.c b/sound/soc/codecs/madera.c
index 12dc468ae6bf0..2be64422adf9b 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,