From 893d67514aebcfd3ebf17bd212ceea1e2741a443 Mon Sep 17 00:00:00 2001 From: Andre Guedes Date: Tue, 31 May 2011 14:20:55 -0300 Subject: [PATCH] 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 Acked-by: Ville Tervo Signed-off-by: Gustavo F. Padovan --- net/bluetooth/hci_conn.c | 4 ++-- 1 file 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 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); -- GitLab