fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/28810 )
Change subject: trxcon: assert *ts is not NULL in l1sched_set_lchans
......................................................................
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
---
M src/host/trxcon/src/sched_trx.c
1 file changed, 1 insertion(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c
index 10a4c5f..af2d9b3 100644
--- a/src/host/trxcon/src/sched_trx.c
+++ b/src/host/trxcon/src/sched_trx.c
@@ -418,10 +418,7 @@
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) {
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/28810
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I53b40b31f20fc9aefdfcac1406c465d226e5fde0
Gerrit-Change-Number: 28810
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged