mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
drm: Cocci spatch "memdup.spatch"
Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
edee06b6f6
commit
8d06cd0af6
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user