From: João Paulo Rechi Vita Date: Tue, 22 Jun 2010 16:56:24 +0000 (-0300) Subject: Bluetooth: Fix error return value on sendmsg. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f9dd11b03c5c3cd6bdf2e503400bbc922c898974;p=linux-beck.git 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 Acked-by: Gustavo F. Padovan Signed-off-by: Marcel Holtmann --- 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; }