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:
parent
f9dd11b03c
commit
bc766db2ef
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue