diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-06 18:23:30 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-06 18:23:30 -0500 |
commit | c217429b14708999d6ac5de964c452600e8797d3 (patch) | |
tree | 6da5bb742cf9096321323ee3e2572f9ab0b417d9 /sound/pci/hda/hda_codec.c | |
parent | 64154835c58a99370c3b7fbf85d2451d6906b3b4 (diff) |
ALSA: hda - Add missing NULL check in amp hash allocation
Added the missing NULL check from allocator in get_alloc_hash().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 810465bac550..f13834ba6b1d 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -899,6 +899,8 @@ static struct hda_cache_head *get_alloc_hash(struct hda_cache_rec *cache, | |||
899 | 899 | ||
900 | /* add a new hash entry */ | 900 | /* add a new hash entry */ |
901 | info = snd_array_new(&cache->buf); | 901 | info = snd_array_new(&cache->buf); |
902 | if (!info) | ||
903 | return NULL; | ||
902 | info->key = key; | 904 | info->key = key; |
903 | info->val = 0; | 905 | info->val = 0; |
904 | info->next = cache->hash[idx]; | 906 | info->next = cache->hash[idx]; |