diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-07-04 13:49:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-07-24 22:00:00 +0000 |
commit | db4ab8e5cef3b1d0800c4d9eab0ea6a4ac886c22 (patch) | |
tree | e6db1d7ba730978f872f9429bee5bea5a1893f3d /src/osmo-bts-trx/scheduler_trx.c | |
parent | 69de62a57348a2b636021663d1271b5738ced116 (diff) |
cosmetic: Move error goto path to the end of the function
Change-Id: I3ad15a9edbfe74de3deb7298441d54fd9d0178ad
Diffstat (limited to 'src/osmo-bts-trx/scheduler_trx.c')
-rw-r--r-- | src/osmo-bts-trx/scheduler_trx.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 26b1705a..967e3db1 100644 --- a/src/osmo-bts-trx/scheduler_trx.c +++ b/src/osmo-bts-trx/scheduler_trx.c @@ -1549,14 +1549,7 @@ static int trx_fn_timer_cb(struct osmo_fd *ofd, unsigned int what) /* check if transceiver is still alive */ if (tcs->fn_without_clock_ind++ == TRX_LOSS_FRAMES) { LOGP(DL1C, LOGL_NOTICE, "No more clock from transceiver\n"); - -no_clock: - timer_ofd_disable(&tcs->fn_timer_ofd); - transceiver_available = 0; - - bts_shutdown(bts, "No clock from osmo-trx"); - - return -1; + goto no_clock; } /* compute actual elapsed time and resulting OS scheduling error */ @@ -1583,6 +1576,14 @@ no_clock: } return 0; + +no_clock: + timer_ofd_disable(&tcs->fn_timer_ofd); + transceiver_available = 0; + + bts_shutdown(bts, "No clock from osmo-trx"); + + return -1; } /*! reset clock with current fn and schedule it. Called when trx becomes |