From: Andre Guedes Date: Tue, 31 May 2011 17:20:55 +0000 (-0300) Subject: Bluetooth: Remove useless check in hci_connect() X-Git-Tag: firefly_0821_release~7613^2~524 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=92398c8163acd942de0a7c7d2d7abcf5ca3d02af;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 803628d6814e..0903effaf7ef 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -464,8 +464,8 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, le = hci_conn_add(hdev, LE_LINK, 0, dst); if (!le) return ERR_PTR(-ENOMEM); - if (le->state == BT_OPEN) - hci_le_connect(le); + + hci_le_connect(le); hci_conn_hold(le);