From: Takashi Iwai Date: Thu, 6 Nov 2008 23:23:30 +0000 (+0100) Subject: ALSA: hda - Add missing NULL check in amp hash allocation X-Git-Tag: v2.6.29-rc1~590^2~6^2~107 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c217429b14708999d6ac5de964c452600e8797d3;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 810465bac55..f13834ba6b1 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, /* add a new hash entry */ info = snd_array_new(&cache->buf); + if (!info) + return NULL; info->key = key; info->val = 0; info->next = cache->hash[idx];