提交 0db75790 编写于 作者: T Takashi Iwai

ALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack()

The fixup function is called multiple times before parsing the pins,
so snd_BUG_ON() hits when loaded.  Move it to the proper place in the
if block.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 2cf215bf
...@@ -2729,12 +2729,13 @@ static void alc271_hp_gate_mic_jack(struct hda_codec *codec, ...@@ -2729,12 +2729,13 @@ static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
{ {
struct alc_spec *spec = codec->spec; struct alc_spec *spec = codec->spec;
if (snd_BUG_ON(!spec->gen.am_entry[1].pin || if (action == HDA_FIXUP_ACT_PROBE) {
!spec->gen.autocfg.hp_pins[0])) if (snd_BUG_ON(!spec->gen.am_entry[1].pin ||
return; !spec->gen.autocfg.hp_pins[0]))
if (action == HDA_FIXUP_ACT_PROBE) return;
snd_hda_jack_set_gating_jack(codec, spec->gen.am_entry[1].pin, snd_hda_jack_set_gating_jack(codec, spec->gen.am_entry[1].pin,
spec->gen.autocfg.hp_pins[0]); spec->gen.autocfg.hp_pins[0]);
}
} }
enum { enum {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册