aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index c0ab72cbeed1..70d4848b5cd0 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -5168,6 +5168,8 @@ EXPORT_SYMBOL_HDA(snd_hda_resume);
5168 */ 5168 */
5169void *snd_array_new(struct snd_array *array) 5169void *snd_array_new(struct snd_array *array)
5170{ 5170{
5171 if (snd_BUG_ON(!array->elem_size))
5172 return NULL;
5171 if (array->used >= array->alloced) { 5173 if (array->used >= array->alloced) {
5172 int num = array->alloced + array->alloc_align; 5174 int num = array->alloced + array->alloc_align;
5173 int size = (num + 1) * array->elem_size; 5175 int size = (num + 1) * array->elem_size;