From: Takashi Iwai Date: Tue, 12 Mar 2013 15:47:30 +0000 (+0100) Subject: ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct value X-Git-Tag: v3.9-rc3~7^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5f82b1044daef74059f454353a2ee97acbbe620;p=pandora-kernel.git ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct value In the connection list expansion in hda_codec.c and hda_proc.c, the value returned from snd_hda_get_num_raw_conns() is used as the array size to store the connection list. However, the function returns simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the widget list with ranges isn't considered there. Thus it may return a smaller size than the actual list, which results in -ENOSPC in snd_hda_get_raw_conections(). This patch fixes the bug by parsing the connection list correctly also for snd_hda_get_num_raw_conns(). Reported-and-tested-by: David Henningsson Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed