提交 dc280801 编写于 作者: J Johan Hedberg 提交者: Gustavo Padovan

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: NJohan Hedberg <johan.hedberg@intel.com>
Acked-by: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 0af784dc
...@@ -4462,7 +4462,7 @@ static int l2cap_create_channel_req(struct l2cap_conn *conn, ...@@ -4462,7 +4462,7 @@ static int l2cap_create_channel_req(struct l2cap_conn *conn,
l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP, l2cap_send_cmd(conn, cmd->ident, L2CAP_CREATE_CHAN_RSP,
sizeof(rsp), &rsp); sizeof(rsp), &rsp);
return -EFAULT; return 0;
} }
static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id) static void l2cap_send_move_chan_req(struct l2cap_chan *chan, u8 dest_amp_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册