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:
Guennadi Liakhovetski 2021-05-17 12:06:48 +02:00 committed by Liam Girdwood
parent c15c43e9fe
commit 1a249e8421
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}
}