Commit bb1d2101 authored by Dan Carpenter's avatar Dan Carpenter Committed by Khalid Elmously

Bluetooth: delete a stray unlock

BugLink: https://bugs.launchpad.net/bugs/1859640

commit df66499a upstream.

We used to take a lock in amp_physical_cfm() but then we moved it to
the caller function.  Unfortunately the unlock on this error path was
overlooked so it leads to a double unlock.

Fixes: a514b17f ("Bluetooth: Refactor locking in amp_physical_cfm")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 60ed782e
...@@ -4897,10 +4897,8 @@ void __l2cap_physical_cfm(struct l2cap_chan *chan, int result) ...@@ -4897,10 +4897,8 @@ void __l2cap_physical_cfm(struct l2cap_chan *chan, int result)
BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d", BT_DBG("chan %p, result %d, local_amp_id %d, remote_amp_id %d",
chan, result, local_amp_id, remote_amp_id); chan, result, local_amp_id, remote_amp_id);
if (chan->state == BT_DISCONN || chan->state == BT_CLOSED) { if (chan->state == BT_DISCONN || chan->state == BT_CLOSED)
l2cap_chan_unlock(chan);
return; return;
}
if (chan->state != BT_CONNECTED) { if (chan->state != BT_CONNECTED) {
l2cap_do_create(chan, result, local_amp_id, remote_amp_id); l2cap_do_create(chan, result, local_amp_id, remote_amp_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment