Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
[cascardo/linux.git] / kernel / fork.c
index 4b4eab2..8cdd3e7 100644 (file)
@@ -687,7 +687,6 @@ static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
                 * the latest pointer.
                 */
                spin_lock(&oldf->file_lock);
-               open_files = count_open_files(old_fdt);
                old_fdt = files_fdtable(oldf);
        }
 
@@ -1316,9 +1315,8 @@ struct task_struct * __devinit fork_idle(int cpu)
        struct pt_regs regs;
 
        task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, NULL, 0);
-       if (!task)
-               return ERR_PTR(-ENOMEM);
-       init_idle(task, cpu);
+       if (!IS_ERR(task))
+               init_idle(task, cpu);
 
        return task;
 }