summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-22 03:16:17 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-07-22 03:21:22 +0700
commit5f47751ddbd9fb44cd098346ab9d952d4a454fe5 (patch)
tree804db2ed87c6448e5dc5fd45c51aa54ecb80bade
parent2a2babbeacff5f3aa474ff9632ed77a9e7eb5f11 (diff)
trxcon: call osmo_timer_del() unconditionally
osmo_timer_del() does check if a timer is active internally. Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
-rw-r--r--src/host/trxcon/src/l1ctl.c3
-rw-r--r--src/host/trxcon/src/trx_if.c3
-rw-r--r--src/host/trxcon/src/trxcon.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c
index 66ddac13..f8faa978 100644
--- a/src/host/trxcon/src/l1ctl.c
+++ b/src/host/trxcon/src/l1ctl.c
@@ -186,8 +186,7 @@ int l1ctl_tx_fbsb_conf(struct l1ctl_client *l1c, uint8_t result,
trxcon->fbsb_conf_sent = true;
/* Abort FBSB expire timer */
- if (osmo_timer_pending(&trxcon->fbsb_timer))
- osmo_timer_del(&trxcon->fbsb_timer);
+ osmo_timer_del(&trxcon->fbsb_timer);
return l1ctl_client_send(l1c, msg);
}
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index f627de8e..dd679f24 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -504,8 +504,7 @@ static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what)
LOGPFSML(trx->fi, LOGL_INFO, "Response message: '%s'\n", buf);
/* Abort expire timer */
- if (osmo_timer_pending(&trx->trx_ctrl_timer))
- osmo_timer_del(&trx->trx_ctrl_timer);
+ osmo_timer_del(&trx->trx_ctrl_timer);
/* Get command for response message */
if (llist_empty(&trx->trx_ctrl_list)) {
diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c
index 77f481ac..9f672e81 100644
--- a/src/host/trxcon/src/trxcon.c
+++ b/src/host/trxcon/src/trxcon.c
@@ -364,8 +364,7 @@ void trxcon_inst_free(struct trxcon_inst *trxcon)
if (trxcon->trx != NULL)
trx_if_close(trxcon->trx);
- if (osmo_timer_pending(&trxcon->fbsb_timer))
- osmo_timer_del(&trxcon->fbsb_timer);
+ osmo_timer_del(&trxcon->fbsb_timer);
if (trxcon->fi != NULL)
osmo_fsm_inst_free(trxcon->fi);