commit 753ca4f312a4b26940e4731b4fa5dbbbbcc77e97
tree bf0ca9aa882e50b681ec72e43998542472752ef6
parent a1b26c32af51d0fd82754bc06b495dd03c2f2d58
author Akinobu Mita <[EMAIL PROTECTED]> 1164481774 -0800
committer Linus Torvalds <[EMAIL PROTECTED]> 1164490114 -0800

[PATCH] fix copy_process() error check

The return value of copy_process() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 kernel/fork.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 3da978e..8cdd3e7 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1315,9 +1315,8 @@ struct task_struct * __devinit fork_idle
        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;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to