summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@profusion.mobi>2010-06-22 18:56:25 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 19:39:10 +0200
commitbc766db2ef3700ae74bdfc88d74b771b97971a24 (patch)
tree0f9fcdb66a2660168e154c8ff17cbf32ac9a47e0
parentBluetooth: Fix error return value on sendmsg. (diff)
downloadlinux-bc766db2ef3700ae74bdfc88d74b771b97971a24.tar.xz
linux-bc766db2ef3700ae74bdfc88d74b771b97971a24.zip
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>
-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
default:
BT_DBG("bad state %1.1x", pi->mode);
- err = -EINVAL;
+ err = -EBADFD;
}
done: