Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d06cd0a authored by Thomas Meyer's avatar Thomas Meyer Committed by Dave Airlie
Browse files

drm: Cocci spatch "memdup.spatch"



Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent edee06b6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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++;