From: João Paulo Rechi Vita Date: Tue, 22 Jun 2010 16:56:25 +0000 (-0300) Subject: Bluetooth: Fix error return value on sendmsg. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bc766db2ef3700ae74bdfc88d74b771b97971a24;p=linux-beck.git 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 Acked-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 884b840081ae..ac25952538fd 100644 --- a/net/bluetooth/l2cap.c +++ b/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: