Skip to content

Commit

Permalink
Bluetooth: Fix l2cap_sock_connect error return.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
João Paulo Rechi Vita authored and Marcel Holtmann committed Jul 21, 2010
1 parent 712132e commit 8b0dc6d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8b0dc6d

Please sign in to comment.