diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2013-09-16 06:05:13 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-09-18 17:41:07 -0400 |
commit | dc280801da1006cd9c702cfaae7ae677fdbc5b53 (patch) | |
tree | b6bf83bd64d013e957addee332d960046449e0d6 /net/bluetooth/l2cap_core.c | |
parent | 0af784dcbc44e3cf21a1bda3ce14df5fcc2bfe93 (diff) |
Bluetooth: Fix double error response for l2cap_create_chan_req
When an L2CAP request handler returns non-zero the calling code will
send a command reject response. The l2cap_create_chan_req function will
in some cases send its own response but then still return a -EFAULT
error which would cause two responses to be sent. This patch fixes this
by making the function return 0 after sending its own response.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b3bb7bca8e60..0b8a2704928e 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -4462,7 +4462,7 @@ error: | |||
4462 | l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP, | 4462 | l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP, |
4463 | sizeof(rsp), &rsp); | 4463 | sizeof(rsp), &rsp); |
4464 | 4464 | ||
4465 | return -EFAULT; | 4465 | return 0; |
4466 | } | 4466 | } |
4467 | 4467 | ||
4468 | static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id) | 4468 | static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id) |