summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-07-25 03:03:38 +0300
committerSasha Levin <sasha.levin@oracle.com>2015-08-27 13:25:29 -0400
commit78d4241231ebd22b09df9133ec98ea0bc4795d4a (patch)
tree5eca54c04e29924fcc4b3aaf3563e78dae8d03ef /sound
parenta513c1125b097786fa123b65336938e89de37ab6 (diff)
downloadlinux-rt-78d4241231ebd22b09df9133ec98ea0bc4795d4a.tar.gz
ALSA: hda - fix cs4210_spdif_automute()
[ Upstream commit 44008f0896ae205b02b0882dbf807f0de149efc4 ] 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: 1077a024812d ('ALSA: hda - Use generic parser for Cirrus codec driver') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index dd2b3d92071f..e5dac8ea65e4 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -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);
}