Bluetooth: Take advantage of hci_cmd_done() helper

Change-Id: Id4945656407e567dcfe764d5d4df04427c8483af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-03-14 13:04:09 +02:00
commit 54f5600fb5

View file

@ -1924,8 +1924,8 @@ static void hci_cmd_tx_fiber(void)
if (err) { if (err) {
BT_ERR("Unable to send to driver (err %d)", err); BT_ERR("Unable to send to driver (err %d)", err);
nano_fiber_sem_give(&bt_dev.ncmd_sem); nano_fiber_sem_give(&bt_dev.ncmd_sem);
net_buf_unref(bt_dev.sent_cmd); hci_cmd_done(cmd(buf)->opcode, BT_HCI_ERR_UNSPECIFIED,
bt_dev.sent_cmd = NULL; NULL);
net_buf_unref(buf); net_buf_unref(buf);
} }
} }