]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Bluetooth: Fix l2cap_sock_connect error return.
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Tue, 22 Jun 2010 16:56:22 +0000 (13:56 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 21 Jul 2010 17:39:10 +0000 (10:39 -0700)
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>
net/bluetooth/l2cap.c

index 6b839d682143555b328588320e0faae1d0db8c3e..e322be8ff94883be5503ef1445a6f4155e3065e6 100644 (file)
@@ -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: