summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 13:56:22 -0300
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 10:39:10 -0700
commit8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee (patch)
tree3ffbf05f365a3d606383d288d5ad553569eac6a0 /net/bluetooth
parent712132eb541e4a76afad97898dc0ce6b6c0032d8 (diff)
downloadop-kernel-dev-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.zip
op-kernel-dev-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.tar.gz
Bluetooth: Fix l2cap_sock_connect error return.
Return a proper error value if socket is already connected. 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')
-rw-r--r--net/bluetooth/l2cap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 6b839d6..e322be8 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1158,6 +1158,7 @@ static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, int al
case BT_CONNECTED:
/* Already connected */
+ err = -EISCONN;
goto done;
case BT_OPEN:
OpenPOWER on IntegriCloud