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>
This commit is contained in:
João Paulo Rechi Vita 2010-06-22 13:56:22 -03:00 committed by Marcel Holtmann
parent 712132eb54
commit 8b0dc6dc82

View 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: