Skip to content

Commit

Permalink
Bluetooth: Controller: Handle return value of ll_deinit()
Browse files Browse the repository at this point in the history
This call may fail. Handling the return value makes it easier
to catch bugs.

Signed-off-by: Rubin Gerritsen <[email protected]>
  • Loading branch information
rugeGerritsen authored and aescolar committed Jul 29, 2024
1 parent d7e6d6e commit 3bcaa6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion subsys/bluetooth/controller/hci/hci_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3bcaa6f

Please sign in to comment.