Commit 93d23958 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luis Henriques

ALSA: hda - fix cs4210_spdif_automute()

commit 44008f08 upstream.

Smatch complains that we have nested checks for "spdif_present".  It
turns out the current behavior isn't correct, we should remove the first
check and keep the second.

Fixes: 1077a024 ('ALSA: hda - Use generic parser for Cirrus codec driver')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 6affaeba
......@@ -1001,9 +1001,7 @@ static void cs4210_spdif_automute(struct hda_codec *codec,
spec->spdif_present = spdif_present;
/* SPDIF TX on/off */
if (spdif_present)
snd_hda_set_pin_ctl(codec, spdif_pin,
spdif_present ? PIN_OUT : 0);
snd_hda_set_pin_ctl(codec, spdif_pin, spdif_present ? PIN_OUT : 0);
cs_automute(codec);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment