projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2cbf3b
)
ALSA: hda - Warn an allocation for an uninitialized array
author
Takashi Iwai
<tiwai@suse.de>
Wed, 10 Oct 2012 06:59:14 +0000
(08:59 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Wed, 10 Oct 2012 07:24:08 +0000
(09:24 +0200)
Better to add a sanity check as I tend to forget something (especially
during crazy midsummer nights).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/hda_codec.c
b/sound/pci/hda/hda_codec.c
index
c0ab72c
..
70d4848
100644
(file)
--- a/
sound/pci/hda/hda_codec.c
+++ b/
sound/pci/hda/hda_codec.c
@@
-5168,6
+5168,8
@@
EXPORT_SYMBOL_HDA(snd_hda_resume);
*/
void *snd_array_new(struct snd_array *array)
{
+ if (snd_BUG_ON(!array->elem_size))
+ return NULL;
if (array->used >= array->alloced) {
int num = array->alloced + array->alloc_align;
int size = (num + 1) * array->elem_size;