From fd85f1f4965f30c8d87756d1e97cf0d99ad0ac6c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 10 Jul 2009 12:52:27 +0200 Subject: [PATCH] --- yaml --- r: 157791 b: refs/heads/master c: 3c6aae4489e7c05f3685e9eaa538249be7c79ebe h: refs/heads/master i: 157789: c1737a2b28d687e63f8690a490bbf84dc8d2210e 157787: 343197d03ecffade0456d44dc17d2194444fc324 157783: c91e1f312885a0b516b95baa5cfa5f38fd8e72d6 157775: e21e13fd56541a81f07f0771a0f033e9166a77c5 157759: f2a887a6dfd671c0f650fa20a71e81f75f0d161a v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_codec.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0d5c8349a63a..95fab2305de0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 31909b83ea5b4035ce129bb0df622ec2d2fb3e96 +refs/heads/master: 3c6aae4489e7c05f3685e9eaa538249be7c79ebe diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index 94d848e98716..ec352c6ae49a 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -316,6 +316,8 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, /* single connection */ parm = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_LIST, 0); + if (parm == -1 && codec->bus->rirb_error) + return -EIO; conn_list[0] = parm & mask; return 1; } @@ -327,9 +329,12 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, 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; parm >>= shift;