Commit 753ca4f3 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] fix copy_process() error check

The return value of copy_process() should be checked by IS_ERR().
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a1b26c32
...@@ -1315,9 +1315,8 @@ struct task_struct * __devinit fork_idle(int cpu) ...@@ -1315,9 +1315,8 @@ struct task_struct * __devinit fork_idle(int cpu)
struct pt_regs regs; struct pt_regs regs;
task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, NULL, 0); task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, NULL, 0);
if (!task) if (!IS_ERR(task))
return ERR_PTR(-ENOMEM); init_idle(task, cpu);
init_idle(task, cpu);
return task; return task;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment