summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 13:56:24 -0300
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 10:39:10 -0700
commitf9dd11b03c5c3cd6bdf2e503400bbc922c898974 (patch)
treebac632bd0ee36f9bc657a7943b93e3204d61b234 /net/bluetooth
parent305682e8377b0f560d4b885c169a72e6a62331e9 (diff)
downloadtalos-op-linux-f9dd11b03c5c3cd6bdf2e503400bbc922c898974.tar.gz
talos-op-linux-f9dd11b03c5c3cd6bdf2e503400bbc922c898974.zip
Bluetooth: Fix error return value on sendmsg.
When we try to send a message bigger than the outgoing MTU value EMSGSIZE (message too long) should be returned. 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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 33e134b0d402..884b840081ae 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1827,7 +1827,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
case L2CAP_MODE_BASIC:
/* Check outgoing MTU */
if (len > pi->omtu) {
- err = -EINVAL;
+ err = -EMSGSIZE;
goto done;
}
OpenPOWER on IntegriCloud