Commit 10e972d3 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915/hdmi, dp: Do not dereference the encoder in the connector destroy

Oops, apparently intel_hdmi/intel_dp is the encoder - an object with a
distinct lifetime to the connector, and so we cannot simply reuse the
common function to unset and free the edid.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d6feb196
...@@ -4395,7 +4395,7 @@ intel_dp_connector_destroy(struct drm_connector *connector) ...@@ -4395,7 +4395,7 @@ intel_dp_connector_destroy(struct drm_connector *connector)
{ {
struct intel_connector *intel_connector = to_intel_connector(connector); struct intel_connector *intel_connector = to_intel_connector(connector);
intel_dp_unset_edid(intel_attached_dp(connector)); kfree(intel_connector->detect_edid);
if (!IS_ERR_OR_NULL(intel_connector->edid)) if (!IS_ERR_OR_NULL(intel_connector->edid))
kfree(intel_connector->edid); kfree(intel_connector->edid);
......
...@@ -1501,7 +1501,7 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder) ...@@ -1501,7 +1501,7 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder)
static void intel_hdmi_destroy(struct drm_connector *connector) static void intel_hdmi_destroy(struct drm_connector *connector)
{ {
intel_hdmi_unset_edid(connector); kfree(to_intel_connector(connector)->detect_edid);
drm_connector_cleanup(connector); drm_connector_cleanup(connector);
kfree(connector); kfree(connector);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment