summaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 20:56:22 +0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 21:39:10 +0400
commit8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee (patch)
tree3ffbf05f365a3d606383d288d5ad553569eac6a0 /net/bluetooth
parent712132eb541e4a76afad97898dc0ce6b6c0032d8 (diff)
downloadlinux-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.tar.xz
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 6b839d682143..e322be8ff948 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: