diff --git a/sched/sched/sched_suspendscheduler.c b/sched/sched/sched_suspendscheduler.c index e1c1105e1e4e5..c0833ef87d417 100644 --- a/sched/sched/sched_suspendscheduler.c +++ b/sched/sched/sched_suspendscheduler.c @@ -63,7 +63,7 @@ void nxsched_suspend_scheduler(FAR struct tcb_s *tcb) { /* Handle the task exiting case */ - if (tcb != NULL) + if (tcb == NULL) { return; }