From 88115d6e8c9389cb93939f16b0db31bbb8812fca Mon Sep 17 00:00:00 2001 From: Wu Fengguang Date: Fri, 14 May 2010 16:36:15 +0800 Subject: [PATCH] --- yaml --- r: 193298 b: refs/heads/master c: 3eaead579ebc09d4f4c050c9b6ce6d67337bcb20 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_hdmi.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index da6347db12bc..40339a43c7a5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e48b00870f269541c28bec8d457904a04545d5e5 +refs/heads/master: 3eaead579ebc09d4f4c050c9b6ce6d67337bcb20 diff --git a/trunk/sound/pci/hda/patch_hdmi.c b/trunk/sound/pci/hda/patch_hdmi.c index 2c2bafbf0258..86067ee78632 100644 --- a/trunk/sound/pci/hda/patch_hdmi.c +++ b/trunk/sound/pci/hda/patch_hdmi.c @@ -766,7 +766,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) if (spec->num_pins >= MAX_HDMI_PINS) { snd_printk(KERN_WARNING "HDMI: no space for pin %d\n", pin_nid); - return -EINVAL; + return -E2BIG; } hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]); @@ -788,7 +788,7 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t nid) if (spec->num_cvts >= MAX_HDMI_CVTS) { snd_printk(KERN_WARNING "HDMI: no space for converter %d\n", nid); - return -EINVAL; + return -E2BIG; } spec->cvt[spec->num_cvts] = nid; @@ -820,15 +820,13 @@ static int hdmi_parse_codec(struct hda_codec *codec) switch (type) { case AC_WID_AUD_OUT: - if (hdmi_add_cvt(codec, nid) < 0) - return -EINVAL; + hdmi_add_cvt(codec, nid); break; case AC_WID_PIN: caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); if (!(caps & (AC_PINCAP_HDMI | AC_PINCAP_DP))) continue; - if (hdmi_add_pin(codec, nid) < 0) - return -EINVAL; + hdmi_add_pin(codec, nid); break; } }