Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1315,8 +1315,7 @@ 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);
	if (!IS_ERR(task))
		init_idle(task, cpu);

	return task;