mirror of https://github.com/thesofproject/sof.git
ll-schedule: (cosmetic) simplify a conditional
If one of the "if" branches contains a jump instruction like "goto," "return," "break" etc. usually making that the only "if" branch simplifies the code. Fix one such case in schedule_ll_task(). Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
c15c43e9fe
commit
1a249e8421
|
@ -444,14 +444,14 @@ static int schedule_ll_task(void *data, struct task *task, uint64_t start,
|
|||
/* the assumption is that the registrable
|
||||
* task has the smallest period
|
||||
*/
|
||||
if (pdata->period >= reg_pdata->period) {
|
||||
pdata->ratio = period / reg_pdata->period;
|
||||
} else {
|
||||
if (pdata->period < reg_pdata->period) {
|
||||
tr_err(&ll_tr,
|
||||
"schedule_ll_task(): registrable task has a period longer than current task");
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
pdata->ratio = period / reg_pdata->period;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue