if (need_aux_ch(encoder, init_dp)) {
dig_port->aux_ch = intel_dp_aux_ch(encoder);
if (dig_port->aux_ch == AUX_CH_NONE)
- goto err;
+ goto err_aux_ch_init;
}
/*
dig_port->unlock = intel_tc_port_unlock;
if (intel_tc_port_init(dig_port, is_legacy) < 0)
- goto err;
+ goto err_aux_ch_init;
}
drm_WARN_ON(display->drm, port > PORT_I);
if (init_dp) {
if (intel_ddi_init_dp_connector(dig_port))
- goto err;
+ goto err_dp_connector_init;
dig_port->hpd_pulse = intel_dp_hpd_pulse;
*/
if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) {
if (intel_ddi_init_hdmi_connector(dig_port))
- goto err;
+ goto err_dp_connector_init;
}
return;
-err:
+err_dp_connector_init:
+ if (intel_encoder_is_tc(encoder))
+ intel_tc_port_cleanup(dig_port);
+err_aux_ch_init:
drm_encoder_cleanup(&encoder->base);
kfree(dig_port);
}