1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Missing NULL check in hda_beep.c
6 Added a NULL check of input_allocate_device() in hda_beep.c.
8 Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 sound/pci/hda/hda_beep.c | 4 ++++
12 1 files changed, 4 insertions(+), 0 deletions(-)
14 diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
15 index b1796ae..3ecd7e7 100644
16 --- a/sound/pci/hda/hda_beep.c
17 +++ b/sound/pci/hda/hda_beep.c
18 @@ -88,6 +88,10 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
19 snprintf(beep->phys, sizeof(beep->phys),
20 "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr);
21 input_dev = input_allocate_device();
27 /* setup digital beep device */
28 input_dev->name = "HDA Digital PCBeep";