Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 893d6751 authored by Andre Guedes's avatar Andre Guedes Committed by Gustavo Padovan
Browse files

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: default avatarAndre Guedes <andre.guedes@openbossa.org>
Acked-by: default avatarVille Tervo <ville.tervo@nokia.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent 29b7988a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -453,7 +453,7 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
		le = hci_conn_add(hdev, LE_LINK, dst);
		le = hci_conn_add(hdev, LE_LINK, dst);
		if (!le)
		if (!le)
			return ERR_PTR(-ENOMEM);
			return ERR_PTR(-ENOMEM);
		if (le->state == BT_OPEN)

		hci_le_connect(le);
		hci_le_connect(le);


		hci_conn_hold(le);
		hci_conn_hold(le);