projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d4e9bb
)
ALSA: hda - Missing NULL check in hda_beep.c
author
Takashi Iwai
<tiwai@suse.de>
Thu, 13 Nov 2008 12:08:56 +0000
(13:08 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 13 Nov 2008 13:37:16 +0000
(14:37 +0100)
Added a NULL check of input_allocate_device() in hda_beep.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_beep.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/hda/hda_beep.c
b/sound/pci/hda/hda_beep.c
index b1796ae1e8fbf634a0905b87095bd6246fee8be4..3ecd7e797deecbbb9fbf5bbfa9ea3c02c00fdaee 100644
(file)
--- 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)
snprintf(beep->phys, sizeof(beep->phys),
"card%d/codec#%d/beep0", codec->bus->card->number, codec->addr);
input_dev = input_allocate_device();
+ if (!input_dev) {
+ kfree(beep);
+ return -ENOMEM;
+ }
/* setup digital beep device */
input_dev->name = "HDA Digital PCBeep";