From: Takashi Iwai Date: Sun, 19 Jul 2009 11:52:31 +0000 (+0200) Subject: Merge branch 'fix/hda' into topic/hda X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=05e870d29aef0bf43124b2bd424103987fadd5b5;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'fix/hda' into topic/hda --- 05e870d29aef0bf43124b2bd424103987fadd5b5 diff --cc sound/pci/hda/hda_codec.c index 35f0f223f85e,88480c0c58a0..d686f4fcd780 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@@ -339,14 -327,17 +339,20 @@@ int snd_hda_get_connections(struct hda_ int range_val; hda_nid_t val, n; - if (i % num_elems == 0) + if (i % num_elems == 0) { parm = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_LIST, i); + if (parm == -1 && codec->bus->rirb_error) + return -EIO; + } range_val = !!(parm & (1 << (shift-1))); /* ranges */ val = parm & mask; + if (val == 0) { + snd_printk(KERN_WARNING "hda_codec: " + "invalid CONNECT_LIST verb %x[%i]:%x\n", + nid, i, parm); + return 0; + } parm >>= shift; if (range_val) { /* ranges between the previous and this one */