Commit edbe1581 authored by Thomas Meyer's avatar Thomas Meyer Committed by Daniel Vetter

drm/i915: Cocci spatch "memdup.spatch"

Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 2dc8aae0
...@@ -2511,11 +2511,10 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) ...@@ -2511,11 +2511,10 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
return NULL; return NULL;
size = (intel_connector->edid->extensions + 1) * EDID_LENGTH; size = (intel_connector->edid->extensions + 1) * EDID_LENGTH;
edid = kmalloc(size, GFP_KERNEL); edid = kmemdup(intel_connector->edid, size, GFP_KERNEL);
if (!edid) if (!edid)
return NULL; return NULL;
memcpy(edid, intel_connector->edid, size);
return edid; return edid;
} }
......
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