From 3bcaa6f8d63136ffc2ae37b6e77ee4e1cda6964f Mon Sep 17 00:00:00 2001 From: Rubin Gerritsen Date: Mon, 27 May 2024 13:03:41 +0200 Subject: [PATCH] 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 --- subsys/bluetooth/controller/hci/hci_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/hci/hci_driver.c b/subsys/bluetooth/controller/hci/hci_driver.c index d5826c9dc59..aa2bdb0c20c 100644 --- a/subsys/bluetooth/controller/hci/hci_driver.c +++ b/subsys/bluetooth/controller/hci/hci_driver.c @@ -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);