summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_edid_load.c
diff options
context:
space:
mode:
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 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++;
OpenPOWER on IntegriCloud