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-Tag: v2.6.36-rc1~571^2~64^2~48^2~26 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8b0dc6dc827fb71efd6c9dfb5c4172b7b5c96cee;p=~shefty%2Frdma-dev.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 6b839d68214..e322be8ff94 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: