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
changes/10/28810/3
Vadim Yanitskiy 2 months ago
parent 2881889b87
commit b084e8569f
  1. 5
      src/host/trxcon/src/sched_trx.c

@ -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) {

Loading…
Cancel
Save