Skip to content

Commit

Permalink
ALSA: hda - fix cs4210_spdif_automute()
Browse files Browse the repository at this point in the history
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: 1077a02 ('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>
  • Loading branch information
Dan Carpenter authored and Takashi Iwai committed Jul 25, 2015
1 parent 43cbf02 commit 44008f0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,9 +999,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);
}
Expand Down

0 comments on commit 44008f0

Please sign in to comment.