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: Takashi Iwai <tiwai@suse.de>
{
struct alc_spec *spec = codec->spec;
- if (snd_BUG_ON(!spec->gen.am_entry[1].pin ||
- !spec->gen.autocfg.hp_pins[0]))
- return;
- if (action == HDA_FIXUP_ACT_PROBE)
+ if (action == HDA_FIXUP_ACT_PROBE) {
+ if (snd_BUG_ON(!spec->gen.am_entry[1].pin ||
+ !spec->gen.autocfg.hp_pins[0]))
+ return;
snd_hda_jack_set_gating_jack(codec, spec->gen.am_entry[1].pin,
spec->gen.autocfg.hp_pins[0]);
+ }
}
enum {