These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / m68k / kernel / bootinfo_proc.c
index 7ee853e..2a33a96 100644 (file)
@@ -62,12 +62,10 @@ static int __init init_bootinfo_procfs(void)
        if (!bootinfo_size)
                return -EINVAL;
 
-       bootinfo_copy = kmalloc(bootinfo_size, GFP_KERNEL);
+       bootinfo_copy = kmemdup(bootinfo_tmp, bootinfo_size, GFP_KERNEL);
        if (!bootinfo_copy)
                return -ENOMEM;
 
-       memcpy(bootinfo_copy, bootinfo_tmp, bootinfo_size);
-
        pde = proc_create_data("bootinfo", 0400, NULL, &bootinfo_fops, NULL);
        if (!pde) {
                kfree(bootinfo_copy);