Browse Source

Bluetooth: Fix error return value on sendmsg.

When the socket is in a bad state EBADFD is more appropriate then EINVAL.

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 15 years ago
parent
commit
bc766db2ef
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/bluetooth/l2cap.c

+ 1 - 1
net/bluetooth/l2cap.c

@@ -1881,7 +1881,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
 
 	default:
 		BT_DBG("bad state %1.1x", pi->mode);
-		err = -EINVAL;
+		err = -EBADFD;
 	}
 
 done: