diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 867bc20e1ef14..1a66a95699151 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -454,7 +454,7 @@ static void cpu_stopper_thread(unsigned int cpu) preempt_disable(); ret = fn(arg); - if (ret) + if (ret && done) done->ret = ret; /* restore preemption and check it's still balanced */