Skip to content

Commit

Permalink
ALSA: hda - Fix missing beep detach in patch_conexant.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Mar 18, 2013
1 parent 9ad477a commit 31b6945
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 31b6945

Please sign in to comment.