diff options
author | Jani Nikula <jani.nikula@intel.com> | 2012-10-19 07:51:51 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-22 13:33:46 -0400 |
commit | ebda95a9965dc6641deacc57ac480e01a378e19b (patch) | |
tree | 41d09b6e271cd9d45306c91680d8f98f3e2e231b /drivers/gpu/drm/i915/intel_crt.c | |
parent | dd06f90ee880c61a534ccbe07bd30a8a7d7f7567 (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_crt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index a720accff2aa..5f7c4146bbff 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -418,12 +418,16 @@ static int intel_crt_ddc_get_modes(struct drm_connector *connector, | |||
418 | struct i2c_adapter *adapter) | 418 | struct i2c_adapter *adapter) |
419 | { | 419 | { |
420 | struct edid *edid; | 420 | struct edid *edid; |
421 | int ret; | ||
421 | 422 | ||
422 | edid = intel_crt_get_edid(connector, adapter); | 423 | edid = intel_crt_get_edid(connector, adapter); |
423 | if (!edid) | 424 | if (!edid) |
424 | return 0; | 425 | return 0; |
425 | 426 | ||
426 | return intel_connector_update_modes(connector, edid); | 427 | ret = intel_connector_update_modes(connector, edid); |
428 | kfree(edid); | ||
429 | |||
430 | return ret; | ||
427 | } | 431 | } |
428 | 432 | ||
429 | static bool intel_crt_detect_ddc(struct drm_connector *connector) | 433 | static bool intel_crt_detect_ddc(struct drm_connector *connector) |