Explorar o código

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>
João Paulo Rechi Vita %!s(int64=15) %!d(string=hai) anos
pai
achega
8b0dc6dc82
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      net/bluetooth/l2cap.c

+ 1 - 0
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: