Skip to content

Commit

Permalink
Bluetooth: Remove useless check in hci_connect()
Browse files Browse the repository at this point in the history
There is no need to check the connection's state since hci_conn_add()
has just created a new connection and its state has been set properly.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Andre Guedes authored and Gustavo F. Padovan committed Jun 8, 2011
1 parent 29b7988 commit 893d675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/hci_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
le = hci_conn_add(hdev, LE_LINK, dst);
if (!le)
return ERR_PTR(-ENOMEM);
if (le->state == BT_OPEN)
hci_le_connect(le);

hci_le_connect(le);

hci_conn_hold(le);

Expand Down

0 comments on commit 893d675

Please sign in to comment.