Commit 4cca9676 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Initialize dig_port->aux_ch to NONE to be sure



Make sure dig_port->aux_ch is trustworthy by initializing it
to NONE (-1) at the start. The encoder init will later fill in
the actual value, if appropriate.

Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230630155846.29931-2-ville.syrjala@linux.intel.com
parent a1222433
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1273,6 +1273,8 @@ bool g4x_dp_init(struct drm_i915_private *dev_priv,
	if (!dig_port)
		return false;

	dig_port->aux_ch = AUX_CH_NONE;

	intel_connector = intel_connector_alloc();
	if (!intel_connector)
		goto err_connector_alloc;
+2 −0
Original line number Diff line number Diff line
@@ -698,6 +698,8 @@ void g4x_hdmi_init(struct drm_i915_private *dev_priv,
	if (!dig_port)
		return;

	dig_port->aux_ch = AUX_CH_NONE;

	intel_connector = intel_connector_alloc();
	if (!intel_connector) {
		kfree(dig_port);
+2 −0
Original line number Diff line number Diff line
@@ -4747,6 +4747,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
	if (!dig_port)
		return;

	dig_port->aux_ch = AUX_CH_NONE;

	encoder = &dig_port->base;
	encoder->devdata = devdata;