]> git.hungrycats.org Git - linux/commitdiff
ALSA: hda - fix cs4210_spdif_automute()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 25 Jul 2015 00:03:38 +0000 (03:03 +0300)
committerSasha Levin <sasha.levin@oracle.com>
Thu, 27 Aug 2015 17:25:29 +0000 (13:25 -0400)
[ 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>
sound/pci/hda/patch_cirrus.c

index dd2b3d92071f698f41a75d2d7b7877eb6b357c00..e5dac8ea65e4925216649c8cdd05499218b96324 100644 (file)
@@ -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);
 }