From bfba7b3793f59adedfde5fb07dee565c5cc15ab8 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 8 Dec 2006 02:40:46 -0800 Subject: [PATCH] drivers/video/*: use kmemdup() From: Eric Sesterhenn Signed-off-by: Eric Sesterhenn Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/nvidia/nv_of.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/video/nvidia/nv_of.c') diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c index d9af88c2b58..181875fe35c 100644 --- a/drivers/video/nvidia/nv_of.c +++ b/drivers/video/nvidia/nv_of.c @@ -72,10 +72,9 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid) } } if (pedid) { - *out_edid = kmalloc(EDID_LENGTH, GFP_KERNEL); + *out_edid = kmemdup(pedid, EDID_LENGTH, GFP_KERNEL); if (*out_edid == NULL) return -1; - memcpy(*out_edid, pedid, EDID_LENGTH); printk(KERN_DEBUG "nvidiafb: Found OF EDID for head %d\n", conn); return 0; } -- cgit v1.2.3-70-g09d2