Skip to content

Commit

Permalink
drm/i915: Cocci spatch "memdup.spatch"
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Thomas Meyer authored and Daniel Vetter committed May 23, 2013
1 parent 2dc8aae commit edbe158
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,11 +2511,10 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
return NULL;

size = (intel_connector->edid->extensions + 1) * EDID_LENGTH;
edid = kmalloc(size, GFP_KERNEL);
edid = kmemdup(intel_connector->edid, size, GFP_KERNEL);
if (!edid)
return NULL;

memcpy(edid, intel_connector->edid, size);
return edid;
}

Expand Down

0 comments on commit edbe158

Please sign in to comment.