Skip to content

Commit

Permalink
Bluetooth: Remove link type check in hci_disconn_complete_evt()
Browse files Browse the repository at this point in the history
We can safely remove the link type check from hci_disconn_complete_
evt() since this check in not required for mgmt_disconnect_failed()
and mgmt_device_disconnected() does it internally.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Andre Guedes authored and Gustavo Padovan committed Dec 4, 2013
1 parent 57eb776 commit 4ebbd53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1792,8 +1792,7 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (ev->status == 0)
conn->state = BT_CLOSED;

if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags) &&
(conn->type == ACL_LINK || conn->type == LE_LINK)) {
if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) {
if (ev->status) {
mgmt_disconnect_failed(hdev, &conn->dst, conn->type,
conn->dst_type, ev->status);
Expand Down

0 comments on commit 4ebbd53

Please sign in to comment.