diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f0e5a917948..af02b29059f 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1924,8 +1924,8 @@ static void hci_cmd_tx_fiber(void) if (err) { BT_ERR("Unable to send to driver (err %d)", err); nano_fiber_sem_give(&bt_dev.ncmd_sem); - net_buf_unref(bt_dev.sent_cmd); - bt_dev.sent_cmd = NULL; + hci_cmd_done(cmd(buf)->opcode, BT_HCI_ERR_UNSPECIFIED, + NULL); net_buf_unref(buf); } }