diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-08 01:04:02 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:14:01 -0800 |
commit | fe7d37d1fbf8ffe78abd72728b24fb0c64f7af55 (patch) | |
tree | 274d82b06d2a711e84381b1357c6332077181d27 /kernel/fork.c | |
parent | ddc0f846aa7621940b74cee0c91cd26405058a4d (diff) | |
download | linux-fe7d37d1fbf8ffe78abd72728b24fb0c64f7af55.tar.bz2 |
[PATCH] copy_process: error path cleanup
This patch moves 'fork_out:' under 'bad_fork_free:', and removes now
unneeded 'if (retval)' check.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 4bc0bd8ef176..72e3252c6763 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1146,11 +1146,6 @@ static task_t *copy_process(unsigned long clone_flags, total_forks++; write_unlock_irq(&tasklist_lock); proc_fork_connector(p); - retval = 0; - -fork_out: - if (retval) - return ERR_PTR(retval); return p; bad_fork_cleanup_namespace: @@ -1191,7 +1186,8 @@ bad_fork_cleanup_count: free_uid(p->user); bad_fork_free: free_task(p); - goto fork_out; +fork_out: + return ERR_PTR(retval); } struct pt_regs * __devinit __attribute__((weak)) idle_regs(struct pt_regs *regs) |