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]);
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;
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;
}
}