]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Bluetooth: delete a stray unlock
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 19 Nov 2019 06:17:05 +0000 (09:17 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 19 Nov 2019 08:16:33 +0000 (09:16 +0100)
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: a514b17fab51 ("Bluetooth: Refactor locking in amp_physical_cfm")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c

index da7fdbdf9c41af026969f6045513d3e7685434bc..a845786258a0bf4c3fa6180b5c84b3d8feec5ef4 100644 (file)
@@ -4936,10 +4936,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",
               chan, result, local_amp_id, remote_amp_id);
 
-       if (chan->state == BT_DISCONN || chan->state == BT_CLOSED) {
-               l2cap_chan_unlock(chan);
+       if (chan->state == BT_DISCONN || chan->state == BT_CLOSED)
                return;
-       }
 
        if (chan->state != BT_CONNECTED) {
                l2cap_do_create(chan, result, local_amp_id, remote_amp_id);