mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
Bluetooth: Fix missing channel unlock in l2cap_le_credits
In the error case where credits is greater than max_credits there is a missing l2cap_chan_unlock before returning. Signed-off-by: Martin Townsend <mtownsend1973@gmail.com> Tested-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
11e3ff7072
commit
ee93053d56
1 changed files with 1 additions and 0 deletions
|
@ -5492,6 +5492,7 @@ static inline int l2cap_le_credits(struct l2cap_conn *conn,
|
||||||
if (credits > max_credits) {
|
if (credits > max_credits) {
|
||||||
BT_ERR("LE credits overflow");
|
BT_ERR("LE credits overflow");
|
||||||
l2cap_send_disconn_req(chan, ECONNRESET);
|
l2cap_send_disconn_req(chan, ECONNRESET);
|
||||||
|
l2cap_chan_unlock(chan);
|
||||||
|
|
||||||
/* Return 0 so that we don't trigger an unnecessary
|
/* Return 0 so that we don't trigger an unnecessary
|
||||||
* command reject packet.
|
* command reject packet.
|
||||||
|
|
Loading…
Add table
Reference in a new issue