drivers/bluetooth: stm32wb: Fix loop

The goto instruction was removed when adding the RX thread.
While still working, this clearly break the clean handling of
error cases.
Re-instantiate the goto instruction.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-04-29 15:14:14 +02:00 committed by Carles Cufí
commit de9fd59669

View file

@ -168,8 +168,8 @@ static void bt_ipm_rx_thread(void)
/* Vendor events are currently unsupported */ /* Vendor events are currently unsupported */
BT_ERR("Unknown evtcode type 0x%02x", BT_ERR("Unknown evtcode type 0x%02x",
hcievt->evtserial.evt.evtcode); hcievt->evtserial.evt.evtcode);
k_sem_give(&ipm_busy); TL_MM_EvtDone(hcievt);
break; goto end_loop;
default: default:
buf = bt_buf_get_evt( buf = bt_buf_get_evt(
hcievt->evtserial.evt.evtcode, hcievt->evtserial.evt.evtcode,
@ -194,7 +194,7 @@ static void bt_ipm_rx_thread(void)
BT_ERR("Unknown BT buf type %d", BT_ERR("Unknown BT buf type %d",
hcievt->evtserial.type); hcievt->evtserial.type);
TL_MM_EvtDone(hcievt); TL_MM_EvtDone(hcievt);
k_sem_give(&ipm_busy); goto end_loop;
} }
TL_MM_EvtDone(hcievt); TL_MM_EvtDone(hcievt);
@ -206,6 +206,7 @@ static void bt_ipm_rx_thread(void)
bt_recv(buf); bt_recv(buf);
} }
end_loop:
k_sem_give(&ipm_busy); k_sem_give(&ipm_busy);
} }