summaryrefslogtreecommitdiff
path: root/drivers/video/nvidia/nv_i2c.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2006-12-08 13:40:46 +0300
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 19:29:07 +0300
commitbfba7b3793f59adedfde5fb07dee565c5cc15ab8 (patch)
treed9e0559f288f0bc24df71ad46800e8cb2b779c59 /drivers/video/nvidia/nv_i2c.c
parentefc08a75d3a2d449edab7d1bee312eaa591f7669 (diff)
downloadlinux-bfba7b3793f59adedfde5fb07dee565c5cc15ab8.tar.xz
[PATCH] drivers/video/*: use kmemdup()
From: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/nvidia/nv_i2c.c')
-rw-r--r--drivers/video/nvidia/nv_i2c.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index 19eef3a09023..442e85328341 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -210,11 +210,8 @@ int nvidia_probe_i2c_connector(struct fb_info *info, int conn, u8 **out_edid)
/* try to get from firmware */
const u8 *e = fb_firmware_edid(info->device);
- if (e != NULL) {
- edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
- if (edid)
- memcpy(edid, e, EDID_LENGTH);
- }
+ if (e != NULL)
+ edid = kmemdup(e, EDID_LENGTH, GFP_KERNEL);
}
*out_edid = edid;