srsue: exit early if radio can't be initialized

since the radio is the first component we initialize, it is safe to
exit the ue::init() straight away, as no other layers use any handles yet
master
Andre Puschmann 5 years ago committed by Xavier Arteaga
parent d16897c09a
commit cf12c98630

@ -95,12 +95,13 @@ int ue::init(const all_args_t& args_, srslte::logger* logger_)
return SRSLTE_ERROR;
}
// init layers (do not exit immedietly if something goes wrong as sub-layers may already use interfaces)
// init layers
if (lte_radio->init(args.rf, lte_phy.get())) {
log.console("Error initializing radio.\n");
ret = SRSLTE_ERROR;
return SRSLTE_ERROR;
}
// from here onwards do not exit immediately if something goes wrong as sub-layers may already use interfaces
if (lte_phy->init(args.phy, lte_stack.get(), lte_radio.get())) {
log.console("Error initializing PHY.\n");
ret = SRSLTE_ERROR;

Loading…
Cancel
Save