aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 12:56:24 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:10 -0400
commitf9dd11b03c5c3cd6bdf2e503400bbc922c898974 (patch)
treebac632bd0ee36f9bc657a7943b93e3204d61b234 /net/bluetooth
parent305682e8377b0f560d4b885c169a72e6a62331e9 (diff)
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
1827 case L2CAP_MODE_BASIC: 1827 case L2CAP_MODE_BASIC:
1828 /* Check outgoing MTU */ 1828 /* Check outgoing MTU */
1829 if (len > pi->omtu) { 1829 if (len > pi->omtu) {
1830 err = -EINVAL; 1830 err = -EMSGSIZE;
1831 goto done; 1831 goto done;
1832 } 1832 }
1833 1833