From: Takashi Iwai Date: Thu, 7 Apr 2011 12:55:57 +0000 (+0200) Subject: ALSA: hda - Don't query connections for widgets have no connections X-Git-Tag: v2.6.39-rc3~7^2^2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=cd9abc7a22806f2340b853058a634b0e32a9f47c;p=~emulex%2Finfiniband.git ALSA: hda - Don't query connections for widgets have no connections Fixes the kernel warnings with IDT codecs like hda_codec: connection list not available for 0x1e Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 05fcd60cc46..a2f57e3581e 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -3408,6 +3408,9 @@ static int get_connection_index(struct hda_codec *codec, hda_nid_t mux, hda_nid_t conn[HDA_MAX_NUM_INPUTS]; int i, nums; + if (!(get_wcaps(codec, mux) & AC_WCAP_CONN_LIST)) + return -1; + nums = snd_hda_get_connections(codec, mux, conn, ARRAY_SIZE(conn)); for (i = 0; i < nums; i++) if (conn[i] == nid)