diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-06-19 13:45:53 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-21 14:54:37 +0300 |
commit | 0bed2aa3ac5cbbd0b89bf5e94f165e2ef18180ad (patch) | |
tree | c68cbf326fce4477f7a0b74860879e1c91c67126 /sound/pci/hda/patch_realtek.c | |
parent | 3bf29db731ce22480de748464031b4447b248c0f (diff) | |
download | linux-0bed2aa3ac5cbbd0b89bf5e94f165e2ef18180ad.tar.xz |
ALSA: hda - Sanity check of unexpected cap_sync_hook override
There are a couple of places setting cap_sync_hook in the codec
drivers, and they just overwrite the value. Add a sanity check via
WARN_ON() in case if an old non-NULL value is overridden and
forgotten.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 32a7a72033ae..d9461eebcfdf 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4828,6 +4828,7 @@ static void alc_probe_headset_mode(struct hda_codec *codec) spec->headphone_mic_pin = cfg->inputs[i].pin; } + WARN_ON(spec->gen.cap_sync_hook); spec->gen.cap_sync_hook = alc_update_headset_mode_hook; spec->gen.automute_hook = alc_update_headset_mode; spec->gen.hp_automute_hook = alc_update_headset_jack_cb; |