Bluetooth: Controller: Handle return value of ll_deinit()

This call may fail. Handling the return value makes it easier
to catch bugs.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit is contained in:
Rubin Gerritsen 2024-05-27 13:03:41 +02:00 committed by Alberto Escolar
parent d7e6d6e2c0
commit 3bcaa6f8d6

View file

@ -881,10 +881,12 @@ static int hci_driver_open(const struct device *dev, bt_hci_recv_t recv)
static int hci_driver_close(const struct device *dev)
{
int err;
struct hci_driver_data *data = dev->data;
/* Resetting the LL stops all roles */
ll_deinit();
err = ll_deinit();
LL_ASSERT(!err);
/* Abort prio RX thread */
k_thread_abort(&prio_recv_thread_data);