diff options
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 2c2bafbf0258..86067ee78632 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
| @@ -766,7 +766,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) | |||
| 766 | if (spec->num_pins >= MAX_HDMI_PINS) { | 766 | if (spec->num_pins >= MAX_HDMI_PINS) { |
| 767 | snd_printk(KERN_WARNING | 767 | snd_printk(KERN_WARNING |
| 768 | "HDMI: no space for pin %d\n", pin_nid); | 768 | "HDMI: no space for pin %d\n", pin_nid); |
| 769 | return -EINVAL; | 769 | return -E2BIG; |
| 770 | } | 770 | } |
| 771 | 771 | ||
| 772 | hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]); | 772 | 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) | |||
| 788 | if (spec->num_cvts >= MAX_HDMI_CVTS) { | 788 | if (spec->num_cvts >= MAX_HDMI_CVTS) { |
| 789 | snd_printk(KERN_WARNING | 789 | snd_printk(KERN_WARNING |
| 790 | "HDMI: no space for converter %d\n", nid); | 790 | "HDMI: no space for converter %d\n", nid); |
| 791 | return -EINVAL; | 791 | return -E2BIG; |
| 792 | } | 792 | } |
| 793 | 793 | ||
| 794 | spec->cvt[spec->num_cvts] = nid; | 794 | spec->cvt[spec->num_cvts] = nid; |
| @@ -820,15 +820,13 @@ static int hdmi_parse_codec(struct hda_codec *codec) | |||
| 820 | 820 | ||
| 821 | switch (type) { | 821 | switch (type) { |
| 822 | case AC_WID_AUD_OUT: | 822 | case AC_WID_AUD_OUT: |
| 823 | if (hdmi_add_cvt(codec, nid) < 0) | 823 | hdmi_add_cvt(codec, nid); |
| 824 | return -EINVAL; | ||
| 825 | break; | 824 | break; |
| 826 | case AC_WID_PIN: | 825 | case AC_WID_PIN: |
| 827 | caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); | 826 | caps = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); |
| 828 | if (!(caps & (AC_PINCAP_HDMI | AC_PINCAP_DP))) | 827 | if (!(caps & (AC_PINCAP_HDMI | AC_PINCAP_DP))) |
| 829 | continue; | 828 | continue; |
| 830 | if (hdmi_add_pin(codec, nid) < 0) | 829 | hdmi_add_pin(codec, nid); |
| 831 | return -EINVAL; | ||
| 832 | break; | 830 | break; |
| 833 | } | 831 | } |
| 834 | } | 832 | } |
