浏览代码

ALSA: hda - Fix broken hash chain allocation

The chaining for amp hash got broken due to the rewrite with
snd_array.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 16 年之前
父节点
当前提交
ea2da6e898
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/pci/hda/hda_codec.c

+ 1 - 0
sound/pci/hda/hda_codec.c

@@ -901,6 +901,7 @@ static struct hda_cache_head  *get_alloc_hash(struct hda_cache_rec *cache,
 	info = snd_array_new(&cache->buf);
 	if (!info)
 		return NULL;
+	cur = cache->buf.used - 1; /* the last entry */
 	info->key = key;
 	info->val = 0;
 	info->next = cache->hash[idx];