Skip to content

Commit

Permalink
ALSA: hda - Add missing NULL check in amp hash allocation
Browse files Browse the repository at this point in the history
Added the missing NULL check from allocator in get_alloc_hash().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Nov 6, 2008
1 parent 6415483 commit c217429
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit c217429

Please sign in to comment.