diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-12-08 02:40:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 08:29:07 -0800 |
commit | bfba7b3793f59adedfde5fb07dee565c5cc15ab8 (patch) | |
tree | d9e0559f288f0bc24df71ad46800e8cb2b779c59 /drivers/video/savage | |
parent | efc08a75d3a2d449edab7d1bee312eaa591f7669 (diff) | |
download | blackbird-op-linux-bfba7b3793f59adedfde5fb07dee565c5cc15ab8.tar.gz blackbird-op-linux-bfba7b3793f59adedfde5fb07dee565c5cc15ab8.zip |
[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/savage')
-rw-r--r-- | drivers/video/savage/savagefb-i2c.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 3f94223b7f0c..cef5bf591cdf 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c @@ -227,11 +227,8 @@ int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid) /* try to get from firmware */ const u8 *e = fb_firmware_edid(info->device); - if (e) { - edid = kmalloc(EDID_LENGTH, GFP_KERNEL); - if (edid) - memcpy(edid, e, EDID_LENGTH); - } + if (e) + edid = kmemdup(e, EDID_LENGTH, GFP_KERNEL); } *out_edid = edid; |