diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-04 16:43:45 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-19 08:41:12 -0400 |
commit | 10e972d3f6dd77e009611c4bfeed02fa9827d0d6 (patch) | |
tree | bdeda3f1d33e0890614f929f1a0a1878c76e865c /drivers/gpu | |
parent | d6feb1962d08890080cbce080a3d73e1035f0a3d (diff) |
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: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 2a26774ddb68..c973cd6bb4f5 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -4395,7 +4395,7 @@ intel_dp_connector_destroy(struct drm_connector *connector) | |||
4395 | { | 4395 | { |
4396 | struct intel_connector *intel_connector = to_intel_connector(connector); | 4396 | struct intel_connector *intel_connector = to_intel_connector(connector); |
4397 | 4397 | ||
4398 | intel_dp_unset_edid(intel_attached_dp(connector)); | 4398 | kfree(intel_connector->detect_edid); |
4399 | 4399 | ||
4400 | if (!IS_ERR_OR_NULL(intel_connector->edid)) | 4400 | if (!IS_ERR_OR_NULL(intel_connector->edid)) |
4401 | kfree(intel_connector->edid); | 4401 | kfree(intel_connector->edid); |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index c5861736b4b0..7fed5bedc10f 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -1501,7 +1501,7 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder) | |||
1501 | 1501 | ||
1502 | static void intel_hdmi_destroy(struct drm_connector *connector) | 1502 | static void intel_hdmi_destroy(struct drm_connector *connector) |
1503 | { | 1503 | { |
1504 | intel_hdmi_unset_edid(connector); | 1504 | kfree(to_intel_connector(connector)->detect_edid); |
1505 | drm_connector_cleanup(connector); | 1505 | drm_connector_cleanup(connector); |
1506 | kfree(connector); | 1506 | kfree(connector); |
1507 | } | 1507 | } |