By design, task_activate API always returns OK.
There is no need to check error condition and
add the un-necessary code. Keep the code clean
Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
/* Activate the task */
- ret = task_activate((FAR struct tcb_s *)tcb);
- if (ret < OK) {
- errcode = get_errno();
-
- /* The TCB was added to the active task list by task_schedsetup() */
+ (void)task_activate((FAR struct tcb_s *)tcb);
- dq_rem((FAR dq_entry_t *)tcb, (dq_queue_t *)&g_inactivetasks);
- goto errout_with_tcb;
- }
trace_end(TTRACE_TAG_TASK);
return pid;
FAR struct tcb_s *rtcb;
FAR struct task_tcb_s *tcb;
irqstate_t state;
- int status;
trace_begin(TTRACE_TAG_TASK, "task_restart");
/* Activate the task */
- status = task_activate((FAR struct tcb_s *)tcb);
- if (status != OK) {
- (void)task_terminate(pid, true);
- set_errno(-status);
- trace_end(TTRACE_TAG_TASK);
- return ERROR;
- }
+ (void)task_activate((FAR struct tcb_s *)tcb);
}
sched_unlock();
/* Activate the task */
- ret = task_activate((FAR struct tcb_s *)child);
- if (ret < OK) {
- task_vforkabort(child, -ret);
- return ERROR;
- }
+ (void)task_activate((FAR struct tcb_s *)child);
/* Since the child task has the same priority as the parent task, it is
* now ready to run, but has not yet ran. It is a requirement that