Skip to content

Commit

Permalink
Bluetooth: Fix error return value on sendmsg.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
João Paulo Rechi Vita authored and Marcel Holtmann committed Jul 21, 2010
1 parent f9dd11b commit bc766db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bc766db

Please sign in to comment.