* [PATCH] drm: Cocci spatch "memdup.spatch"
@ 2013-05-22 21:06 Thomas Meyer
0 siblings, 0 replies; only message in thread
From: Thomas Meyer @ 2013-05-22 21:06 UTC (permalink / raw)
To: airlied, dri-devel, linux-kernel
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/gpu/drm/drm_edid_load.c b/drivers/gpu/drm/drm_edid_load.c
--- 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_connecto
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++;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-22 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 21:06 [PATCH] drm: Cocci spatch "memdup.spatch" Thomas Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox