diff options
author | João Paulo Rechi Vita <jprvita@profusion.mobi> | 2010-06-22 13:56:22 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-21 10:39:10 -0700 |
commit | 8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee (patch) | |
tree | 3ffbf05f365a3d606383d288d5ad553569eac6a0 /net/bluetooth | |
parent | 712132eb541e4a76afad97898dc0ce6b6c0032d8 (diff) | |
download | linux-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.tar.gz linux-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.tar.bz2 linux-8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee.zip |
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.c | 1 |
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: |