From db4ab8e5cef3b1d0800c4d9eab0ea6a4ac886c22 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 4 Jul 2017 13:49:18 +0200 Subject: [PATCH] cosmetic: Move error goto path to the end of the function Change-Id: I3ad15a9edbfe74de3deb7298441d54fd9d0178ad --- src/osmo-bts-trx/scheduler_trx.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c index 26b1705a5..967e3db15 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