summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_edid_load.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2013-05-23 01:06:30 +0400
committerDave Airlie <airlied@redhat.com>2013-06-11 02:29:22 +0400
commit8d06cd0af6c50a26d87ce78310ad38b9b40fa795 (patch)
tree442e8991386480c0870fb29c635701bda4ac6c41 /drivers/gpu/drm/drm_edid_load.c
parentedee06b6f6b55c81c4cb78d0776d8ca01b05380d (diff)
downloadlinux-8d06cd0af6c50a26d87ce78310ad38b9b40fa795.tar.xz
drm: Cocci spatch "memdup.spatch"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_edid_load.c')
-rw-r--r--drivers/gpu/drm/drm_edid_load.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
index fa445dd4dc00..a4f5ce14dc1c 100644
--- a/drivers/gpu/drm/drm_edid_load.c
+++ b/drivers/gpu/drm/drm_edid_load.c
@@ -186,12 +186,11 @@ static u8 *edid_load(struct drm_connector *connector, char *name,
goto relfw_out;
}
- edid = kmalloc(fwsize, GFP_KERNEL);
+ edid = kmemdup(fwdata, fwsize, GFP_KERNEL);
if (edid == NULL) {
err = -ENOMEM;
goto relfw_out;
}
- memcpy(edid, fwdata, fwsize);
if (!drm_edid_block_valid(edid, 0, print_bad_edid)) {
connector->bad_edid_counter++;