aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 12:56:22 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:10 -0400
commit8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee (patch)
tree3ffbf05f365a3d606383d288d5ad553569eac6a0
parent712132eb541e4a76afad97898dc0ce6b6c0032d8 (diff)
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>
-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
1158 1158
1159 case BT_CONNECTED: 1159 case BT_CONNECTED:
1160 /* Already connected */ 1160 /* Already connected */
1161 err = -EISCONN;
1161 goto done; 1162 goto done;
1162 1163
1163 case BT_OPEN: 1164 case BT_OPEN: