提交 bc766db2 编写于 作者: J João Paulo Rechi Vita 提交者: Marcel Holtmann

Bluetooth: Fix error return value on sendmsg.

When the socket is in a bad state EBADFD is more appropriate then EINVAL.
Signed-off-by: NJoão Paulo Rechi Vita <jprvita@profusion.mobi>
Acked-by: NGustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 f9dd11b0
...@@ -1881,7 +1881,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms ...@@ -1881,7 +1881,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
default: default:
BT_DBG("bad state %1.1x", pi->mode); BT_DBG("bad state %1.1x", pi->mode);
err = -EINVAL; err = -EBADFD;
} }
done: done:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册