Skip to contentSkip to conversation

sparc64: check fork_idle() error

PATCH New Akinobu Mita 1 participant 1 message Sep 29, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: check fork_idle() error

Check the return value of fork_idle() to catch error.

Cc "David S. Miller" <[email protected]>
---
 arch/sparc64/kernel/smp.c |    2 ++
 1 file changed, 2 insertions(+)

Index: 2.6-git/arch/sparc64/kernel/smp.c =================================--- 2.6-git.orig/arch/sparc64/kernel/smp.c +++ 2.6-git/arch/sparc64/kernel/smp.c
@@ -353,6 +353,8 @@ static int __devinit smp_boot_one_cpu(un
int timeout, ret;

p = fork_idle(cpu);
+ if (IS_ERR(p))
+ return PTR_ERR(p);
callin_flag = 0;
cpu_new_thread = task_thread_info(p);