drm/i915: export error state ref handling
[deliverable/linux.git] / drivers / gpu / drm / drm_edid_load.c
index fa445dd4dc006e5c1ec2f079b206cdd72cecf7e6..a4f5ce14dc1cdca1970a689ab19f6c10144aec8d 100644 (file)
@@ -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++;
This page took 0.024241 seconds and 5 git commands to generate.