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

Commit 963cf687 authored by João Paulo Rechi Vita's avatar João Paulo Rechi Vita Committed by Marcel Holtmann
Browse files

Bluetooth: Fix error return on L2CAP-HCI interface.



L2CAP only deals with ACL links. EINVAL should be returned otherwise.

Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Acked-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 7a560e5c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -4415,7 +4415,7 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
	struct hlist_node *node;

	if (type != ACL_LINK)
		return 0;
		return -EINVAL;

	BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));

@@ -4448,7 +4448,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
	BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);

	if (hcon->type != ACL_LINK)
		return 0;
		return -EINVAL;

	if (!status) {
		conn = l2cap_conn_add(hcon, status);
@@ -4477,7 +4477,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
	BT_DBG("hcon %p reason %d", hcon, reason);

	if (hcon->type != ACL_LINK)
		return 0;
		return -EINVAL;

	l2cap_conn_del(hcon, bt_err(reason));