diff options
author | Greg Dietsche <Gregory.Dietsche@cuw.edu> | 2012-01-15 14:44:34 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-08 16:47:50 -0800 |
commit | 28aa41fb8d555b120edefd7fdf879b156a1c9f3a (patch) | |
tree | d653d9980687fc53342db058e7713dcbc9616502 /drivers/staging/android | |
parent | e96045a7c837200e65c9fa8f8a94020bc2107931 (diff) | |
download | blackbird-obmc-linux-28aa41fb8d555b120edefd7fdf879b156a1c9f3a.tar.gz blackbird-obmc-linux-28aa41fb8d555b120edefd7fdf879b156a1c9f3a.zip |
staging: android: ram_console use kmemdup instead of kmalloc
Replace kmalloc + memcpy will kmemdup in ram_console_late_init
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r-- | drivers/staging/android/ram_console.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c index 6d4d67924f22..0cb3f3c227fc 100644 --- a/drivers/staging/android/ram_console.c +++ b/drivers/staging/android/ram_console.c @@ -411,15 +411,14 @@ static int __init ram_console_late_init(void) if (ram_console_old_log == NULL) return 0; #ifdef CONFIG_ANDROID_RAM_CONSOLE_EARLY_INIT - ram_console_old_log = kmalloc(ram_console_old_log_size, GFP_KERNEL); + ram_console_old_log = kmemdup(ram_console_old_log_init_buffer, + ram_console_old_log_size, GFP_KERNEL); if (ram_console_old_log == NULL) { printk(KERN_ERR "ram_console: failed to allocate buffer for old log\n"); ram_console_old_log_size = 0; return 0; } - memcpy(ram_console_old_log, - ram_console_old_log_init_buffer, ram_console_old_log_size); #endif entry = create_proc_entry("last_kmsg", S_IFREG | S_IRUGO, NULL); if (!entry) { |