diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-03-17 10:23:40 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-03-18 10:06:41 +0100 |
commit | 31b6945a899a30f9dffa9cba8ed2e494784810a9 (patch) | |
tree | 5396bbb9ff0967a3f1d47928a09319b436f265c0 /sound | |
parent | ALSA: documentation: Fix typo in Documentation/sound (diff) | |
download | linux-31b6945a899a30f9dffa9cba8ed2e494784810a9.tar.xz linux-31b6945a899a30f9dffa9cba8ed2e494784810a9.zip |
ALSA: hda - Fix missing beep detach in patch_conexant.c
This leaks the beep input device after module unload, which leads to
Oops.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55321
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 941bf6c766ec..1051a88f5304 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -3191,11 +3191,17 @@ static int cx_auto_build_controls(struct hda_codec *codec) return 0; } +static void cx_auto_free(struct hda_codec *codec) +{ + snd_hda_detach_beep_device(codec); + snd_hda_gen_free(codec); +} + static const struct hda_codec_ops cx_auto_patch_ops = { .build_controls = cx_auto_build_controls, .build_pcms = snd_hda_gen_build_pcms, .init = snd_hda_gen_init, - .free = snd_hda_gen_free, + .free = cx_auto_free, .unsol_event = snd_hda_jack_unsol_event, #ifdef CONFIG_PM .check_power_status = snd_hda_gen_check_power_status, |