Add support for deferrable timers
[deliverable/linux.git] / kernel / module.c
index 1eb8ca565ba0422810f7ad833981a22064483965..9bdbd1217a6f2eec4ed775dd42357acac1f51b82 100644 (file)
@@ -310,14 +310,14 @@ static int split_block(unsigned int i, unsigned short size)
 {
        /* Reallocation required? */
        if (pcpu_num_used + 1 > pcpu_num_allocated) {
-               int *new = kmalloc(sizeof(new[0]) * pcpu_num_allocated*2,
-                                  GFP_KERNEL);
+               int *new;
+
+               new = krealloc(pcpu_size, sizeof(new[0])*pcpu_num_allocated*2,
+                              GFP_KERNEL);
                if (!new)
                        return 0;
 
-               memcpy(new, pcpu_size, sizeof(new[0])*pcpu_num_allocated);
                pcpu_num_allocated *= 2;
-               kfree(pcpu_size);
                pcpu_size = new;
        }
 
This page took 0.026347 seconds and 5 git commands to generate.