diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2011-05-31 13:20:55 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-08 15:58:18 -0400 |
commit | 893d67514aebcfd3ebf17bd212ceea1e2741a443 (patch) | |
tree | f1c974727dd33f06c122958ecbc370f33a850806 /net/bluetooth/hci_conn.c | |
parent | 29b7988a23daf79c15d587ef9e98e64715aa1ea8 (diff) |
Bluetooth: Remove useless check in hci_connect()
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>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index e67540216cd4..ca283a0f63ea 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -453,8 +453,8 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 | |||
453 | le = hci_conn_add(hdev, LE_LINK, dst); | 453 | le = hci_conn_add(hdev, LE_LINK, dst); |
454 | if (!le) | 454 | if (!le) |
455 | return ERR_PTR(-ENOMEM); | 455 | return ERR_PTR(-ENOMEM); |
456 | if (le->state == BT_OPEN) | 456 | |
457 | hci_le_connect(le); | 457 | hci_le_connect(le); |
458 | 458 | ||
459 | hci_conn_hold(le); | 459 | hci_conn_hold(le); |
460 | 460 | ||