diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2013-05-22 21:06:30 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-06-10 22:29:22 (GMT) |
commit | 8d06cd0af6c50a26d87ce78310ad38b9b40fa795 (patch) | |
tree | 442e8991386480c0870fb29c635701bda4ac6c41 /drivers/gpu | |
parent | edee06b6f6b55c81c4cb78d0776d8ca01b05380d (diff) | |
download | linux-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')
-rw-r--r-- | drivers/gpu/drm/drm_edid_load.c | 3 |
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 fa445dd..a4f5ce1 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++; |