projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.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
|
blame
|
history
diff --git
a/sound/pci/hda/hda_codec.c
b/sound/pci/hda/hda_codec.c
index c0ab72cbeed1288da505468e27e42b3dca984b3f..70d4848b5cd0ad25ce272877f9c759ed010dfc58 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;