aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 12:56:25 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:10 -0400
commitbc766db2ef3700ae74bdfc88d74b771b97971a24 (patch)
tree0f9fcdb66a2660168e154c8ff17cbf32ac9a47e0 /net/bluetooth
parentf9dd11b03c5c3cd6bdf2e503400bbc922c898974 (diff)
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>
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 884b840081ae..ac25952538fd 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1881,7 +1881,7 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
1881 1881
1882 default: 1882 default:
1883 BT_DBG("bad state %1.1x", pi->mode); 1883 BT_DBG("bad state %1.1x", pi->mode);
1884 err = -EINVAL; 1884 err = -EBADFD;
1885 } 1885 }
1886 1886
1887done: 1887done: