ALSA: hda - Clear codec->beep at release
authorTakashi Iwai <tiwai@suse.de>
Fri, 6 Feb 2009 15:48:10 +0000 (16:48 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 6 Feb 2009 15:48:10 +0000 (16:48 +0100)
Clear codec->beep field in snd_hda_detach_beep_device() to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_beep.c

index 960fd79703848e153cb44fcff27ed58f97ad3337..4de5bacd392924d94482a45b8885182e966780ab 100644 (file)
@@ -138,6 +138,7 @@ void snd_hda_detach_beep_device(struct hda_codec *codec)
 
                input_unregister_device(beep->dev);
                kfree(beep);
+               codec->beep = NULL;
        }
 }
 EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device);