trxcon: call osmo_timer_del() unconditionally

osmo_timer_del() does check if a timer is active internally.

Change-Id: I4ede5b19eeb847fe8fdaed52a8b5c801b3de209a
This commit is contained in:
Vadim Yanitskiy 2022-07-22 03:16:17 +07:00
parent 2a2babbeac
commit 5f47751ddb
3 changed files with 3 additions and 6 deletions

View File

@ -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);
}

View File

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

View File

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