aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 12:56:28 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:10 -0400
commit963cf687e825f7a59817f145a1ea19bdc224a18f (patch)
treece13f66353099e348226859d976998b1452ec493 /net/bluetooth/l2cap.c
parent7a560e5c99dc5f03e2c0dbe05ed20008af5d0bcf (diff)
Bluetooth: Fix error return on L2CAP-HCI interface.
L2CAP only deals with ACL links. EINVAL should be returned otherwise. Signed-off-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index de545f1687d8..a3dfee97ab9d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -4415,7 +4415,7 @@ static int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
4415 struct hlist_node *node; 4415 struct hlist_node *node;
4416 4416
4417 if (type != ACL_LINK) 4417 if (type != ACL_LINK)
4418 return 0; 4418 return -EINVAL;
4419 4419
4420 BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr)); 4420 BT_DBG("hdev %s, bdaddr %s", hdev->name, batostr(bdaddr));
4421 4421
@@ -4448,7 +4448,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
4448 BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status); 4448 BT_DBG("hcon %p bdaddr %s status %d", hcon, batostr(&hcon->dst), status);
4449 4449
4450 if (hcon->type != ACL_LINK) 4450 if (hcon->type != ACL_LINK)
4451 return 0; 4451 return -EINVAL;
4452 4452
4453 if (!status) { 4453 if (!status) {
4454 conn = l2cap_conn_add(hcon, status); 4454 conn = l2cap_conn_add(hcon, status);
@@ -4477,7 +4477,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
4477 BT_DBG("hcon %p reason %d", hcon, reason); 4477 BT_DBG("hcon %p reason %d", hcon, reason);
4478 4478
4479 if (hcon->type != ACL_LINK) 4479 if (hcon->type != ACL_LINK)
4480 return 0; 4480 return -EINVAL;
4481 4481
4482 l2cap_conn_del(hcon, bt_err(reason)); 4482 l2cap_conn_del(hcon, bt_err(reason));
4483 4483