diff --git a/kernel/smp.c b/kernel/smp.c index 3b7bedc97af38d004f74439b4e587d9666e42580..d0ada39eb4d41bb4a246d28bec3f7ed4ba9d8c2a 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -435,7 +435,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask, /* Fastpath: do that cpu by itself. */ if (next_cpu >= nr_cpu_ids) { - if (!cond_func || (cond_func && cond_func(cpu, info))) + if (!cond_func || cond_func(cpu, info)) smp_call_function_single(cpu, func, info, wait); return; } diff --git a/kernel/up.c b/kernel/up.c index 53144d0562522e6d00824073f65ffa9926ae6261..c6f323dcd45bb9efe1401b1b7893350667305493 100644 --- a/kernel/up.c +++ b/kernel/up.c @@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, { unsigned long flags; - WARN_ON(cpu != 0); + if (cpu != 0) + return -ENXIO; local_irq_save(flags); func(info);