From: Takashi Iwai Date: Tue, 8 May 2007 13:17:15 +0000 (+0200) Subject: [ALSA] hda-codec - Fix connection list in generic parser X-Git-Tag: v2.6.22-rc1~22^2~3 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=0bbed758c024bb72cec8219879dc87cb04c6dd5c;p=sfrench%2Fcifs-2.6.git [ALSA] hda-codec - Fix connection list in generic parser Fix the retrival of widget connection list in the generic parser. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 1e5ff0cd3709..000287f7da43 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -133,7 +133,7 @@ static int add_new_node(struct hda_codec *codec, struct hda_gspec *spec, hda_nid return -ENOMEM; } } - memcpy(node->conn_list, conn_list, nconns); + memcpy(node->conn_list, conn_list, nconns * sizeof(hda_nid_t)); node->nconns = nconns; node->wid_caps = get_wcaps(codec, nid); node->type = (node->wid_caps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;