]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/fork.c
[SCTP]: Switch sctp_endpoint_is_match() to net-endian.
[linux-2.6-omap-h63xx.git] / kernel / fork.c
index 4b4eab2a316136fc3bd44bdb7e55eeee509b1030..8cdd3e72ba55f9ee52b098e67b1b7d4fcd04aa58 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;
 }