diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-07-25 03:03:38 +0300 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 19:59:51 +0200 |
| commit | 8b2ccdcb093f4c88a687eb242c99c20b054822f2 (patch) | |
| tree | 79a0197bee01e6ae0deddf6f21a6d339f6ea9fef | |
| parent | 5dbe8810a0bc4fb00a9bf7df22e152b39df242e8 (diff) | |
ALSA: hda - fix cs4210_spdif_automute()
commit 44008f0896ae205b02b0882dbf807f0de149efc4 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: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
| -rw-r--r-- | sound/pci/hda/patch_cirrus.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index e2642ba88..2ba07ae70 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -787,9 +787,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); } |
