mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] fix copy_process() error check
The return value of copy_process() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
a1b26c32af
commit
753ca4f312
1 changed files with 2 additions and 3 deletions
|
@ -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(®s), 0, NULL, NULL, 0);
|
task = copy_process(CLONE_VM, 0, idle_regs(®s), 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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue