trxcon: assert *ts is not NULL in l1sched_set_lchans

We cannot use ts->sched as logging context because ts is NULL.

Change-Id: I53b40b31f20fc9aefdfcac1406c465d226e5fde0
Related: CID#275337
This commit is contained in:
Vadim Yanitskiy 2022-07-27 15:19:30 +07:00
parent 2881889b87
commit b084e8569f
1 changed files with 1 additions and 4 deletions

View File

@ -418,10 +418,7 @@ int l1sched_set_lchans(struct l1sched_ts *ts, uint8_t chan_nr,
int rc = 0;
/* Prevent NULL-pointer deference */
if (ts == NULL) {
LOGP_SCHEDC(ts->sched, LOGL_ERROR, "Timeslot isn't configured\n");
return -EINVAL;
}
OSMO_ASSERT(ts != NULL);
/* Iterate over all allocated lchans */
llist_for_each_entry(lchan, &ts->lchans, list) {