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>
This commit is contained in:
João Paulo Rechi Vita 2010-06-22 13:56:25 -03:00 committed by Marcel Holtmann
parent f9dd11b03c
commit bc766db2ef
1 changed files with 1 additions and 1 deletions

View File

@ -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: