mirror of https://github.com/thesofproject/sof.git
host: schedule: check task_init op before calling
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
parent
d3e68f91e4
commit
d0a46c26e7
|
@ -55,7 +55,10 @@ int schedule_task_init(struct task *task, uint16_t type, uint16_t priority,
|
||||||
task->func = func;
|
task->func = func;
|
||||||
task->data = data;
|
task->data = data;
|
||||||
|
|
||||||
return schedulers[task->type]->schedule_task_init(task, xflags);
|
if (schedulers[task->type]->schedule_task_init)
|
||||||
|
return schedulers[task->type]->schedule_task_init(task, xflags);
|
||||||
|
else
|
||||||
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void schedule_task(struct task *task, uint64_t start, uint64_t deadline,
|
void schedule_task(struct task *task, uint64_t start, uint64_t deadline,
|
||||||
|
|
Loading…
Reference in New Issue