From: João Paulo Rechi Vita Date: Tue, 22 Jun 2010 16:56:22 +0000 (-0300) Subject: Bluetooth: Fix l2cap_sock_connect error return. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee;p=linux-beck.git 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 Acked-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann --- 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: