]> git.karo-electronics.de Git - linux-beck.git/blobdiff - sound/pci/hda/hda_codec.c
ALSA: hda - Warn an allocation for an uninitialized array
[linux-beck.git] / sound / pci / hda / hda_codec.c
index c0ab72cbeed1288da505468e27e42b3dca984b3f..70d4848b5cd0ad25ce272877f9c759ed010dfc58 100644 (file)
@@ -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;