mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 12:52:40 -04:00
drm/i915: Cocci spatch "memdup.spatch"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
committed by
Daniel Vetter
parent
2dc8aae06d
commit
edbe1581c5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user