summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-27 15:19:30 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-30 17:05:58 +0700
commitb084e8569fadb1ab8f6c9934df96cc2670385fb4 (patch)
treee08e04a04f53ba688319c43475230580db0e8e17
parent2881889b878e2922a38d4ad3a4b7b3534dc1114d (diff)
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
-rw-r--r--src/host/trxcon/src/sched_trx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c
index 10a4c5f2..af2d9b39 100644
--- a/src/host/trxcon/src/sched_trx.c
+++ b/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) {