aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_modes.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2012-10-19 07:51:51 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-22 13:33:46 -0400
commitebda95a9965dc6641deacc57ac480e01a378e19b (patch)
tree41d09b6e271cd9d45306c91680d8f98f3e2e231b /drivers/gpu/drm/i915/intel_modes.c
parentdd06f90ee880c61a534ccbe07bd30a8a7d7f7567 (diff)
drm/i915: Do not free the passed EDID in intel_connector_update_modes()
The caller, not intel_connector_update_modes(), should free the edid. This improves the reusability of intel_connector_update_modes(). Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_modes.c')
-rw-r--r--drivers/gpu/drm/i915/intel_modes.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index cabd84bf66eb..d49985fcb27f 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -45,7 +45,6 @@ int intel_connector_update_modes(struct drm_connector *connector,
45 drm_mode_connector_update_edid_property(connector, edid); 45 drm_mode_connector_update_edid_property(connector, edid);
46 ret = drm_add_edid_modes(connector, edid); 46 ret = drm_add_edid_modes(connector, edid);
47 drm_edid_to_eld(connector, edid); 47 drm_edid_to_eld(connector, edid);
48 kfree(edid);
49 48
50 return ret; 49 return ret;
51} 50}
@@ -61,12 +60,16 @@ int intel_ddc_get_modes(struct drm_connector *connector,
61 struct i2c_adapter *adapter) 60 struct i2c_adapter *adapter)
62{ 61{
63 struct edid *edid; 62 struct edid *edid;
63 int ret;
64 64
65 edid = drm_get_edid(connector, adapter); 65 edid = drm_get_edid(connector, adapter);
66 if (!edid) 66 if (!edid)
67 return 0; 67 return 0;
68 68
69 return intel_connector_update_modes(connector, edid); 69 ret = intel_connector_update_modes(connector, edid);
70 kfree(edid);
71
72 return ret;
70} 73}
71 74
72static const struct drm_prop_enum_list force_audio_names[] = { 75static const struct drm_prop_enum_list force_audio_names[] = {