aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-13 07:08:56 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-13 08:37:16 -0500
commit6a12afb5640217454cad21e8cf9a74b038fa3717 (patch)
tree94bc5f927ee969a3d468dd4e4d83810f60ef313d /sound
parent4d4e9bb339cfcde7811af10859ba1ce2fe3d46b4 (diff)
ALSA: hda - Missing NULL check in hda_beep.c
Added a NULL check of input_allocate_device() in hda_beep.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_beep.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index b1796ae1e8fb..3ecd7e797dee 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -88,6 +88,10 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
88 snprintf(beep->phys, sizeof(beep->phys), 88 snprintf(beep->phys, sizeof(beep->phys),
89 "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr); 89 "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr);
90 input_dev = input_allocate_device(); 90 input_dev = input_allocate_device();
91 if (!input_dev) {
92 kfree(beep);
93 return -ENOMEM;
94 }
91 95
92 /* setup digital beep device */ 96 /* setup digital beep device */
93 input_dev->name = "HDA Digital PCBeep"; 97 input_dev->name = "HDA Digital PCBeep";