aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorMartin Townsend <mtownsend1973@gmail.com>2014-10-13 14:24:45 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-10-25 01:56:25 -0400
commitee93053d569b8b56e09a278fc9c41b7adf070a96 (patch)
tree8ad25c2d3298ca0d46cde38cf15bb4989fe6f352 /net/bluetooth
parent11e3ff7072789ad4585870cbdde1be10c45f1cc4 (diff)
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 2ff5591bee97..d46c5127f6c3 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -5492,6 +5492,7 @@ static inline int l2cap_le_credits(struct l2cap_conn *conn,
5492 if (credits > max_credits) { 5492 if (credits > max_credits) {
5493 BT_ERR("LE credits overflow"); 5493 BT_ERR("LE credits overflow");
5494 l2cap_send_disconn_req(chan, ECONNRESET); 5494 l2cap_send_disconn_req(chan, ECONNRESET);
5495 l2cap_chan_unlock(chan);
5495 5496
5496 /* Return 0 so that we don't trigger an unnecessary 5497 /* Return 0 so that we don't trigger an unnecessary
5497 * command reject packet. 5498 * command reject packet.