diff options
author | Jani Nikula <jani.nikula@intel.com> | 2013-10-01 03:38:54 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-10-09 01:55:29 -0400 |
commit | 55e9edeb57ed9dd9be6773c5230187d701b14a46 (patch) | |
tree | c7f49883825795af485457e80313122fb7012826 /drivers/gpu/drm | |
parent | 1eee814dfd509e7fdb28361303c9b0ac927ff4c1 (diff) |
drm/i915/dp: use drm_edid_duplicate
v2: duplicate intel_connector->edid, not uninitialized edid (Dave Airlie).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 605908df95d8..3575b86ca799 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -2920,19 +2920,11 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) | |||
2920 | 2920 | ||
2921 | /* use cached edid if we have one */ | 2921 | /* use cached edid if we have one */ |
2922 | if (intel_connector->edid) { | 2922 | if (intel_connector->edid) { |
2923 | struct edid *edid; | ||
2924 | int size; | ||
2925 | |||
2926 | /* invalid edid */ | 2923 | /* invalid edid */ |
2927 | if (IS_ERR(intel_connector->edid)) | 2924 | if (IS_ERR(intel_connector->edid)) |
2928 | return NULL; | 2925 | return NULL; |
2929 | 2926 | ||
2930 | size = (intel_connector->edid->extensions + 1) * EDID_LENGTH; | 2927 | return drm_edid_duplicate(intel_connector->edid); |
2931 | edid = kmemdup(intel_connector->edid, size, GFP_KERNEL); | ||
2932 | if (!edid) | ||
2933 | return NULL; | ||
2934 | |||
2935 | return edid; | ||
2936 | } | 2928 | } |
2937 | 2929 | ||
2938 | return drm_get_edid(connector, adapter); | 2930 | return drm_get_edid(connector, adapter); |