summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
authorDavid S. Miller2019-02-25 07:27:19 +0100
committerDavid S. Miller2019-02-25 07:27:19 +0100
commite8b47b53a172e74dd9907eb7810f02a1d09fb29b (patch)
tree17a5289187a67507f4ea6af37b282521dc735718 /net/bluetooth/hci_sock.c
parentnet: fix double-free in bpf_lwt_xmit_reroute (diff)
parentBluetooth: mediatek: update the common setup between MT7622 and other devices (diff)
downloadkernel-qcow2-linux-e8b47b53a172e74dd9907eb7810f02a1d09fb29b.tar.gz
kernel-qcow2-linux-e8b47b53a172e74dd9907eb7810f02a1d09fb29b.tar.xz
kernel-qcow2-linux-e8b47b53a172e74dd9907eb7810f02a1d09fb29b.zip
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Johan Hedberg says: ==================== Here's the main bluetooth-next pull request for the 5.1 kernel. - Fixes & improvements to mediatek, hci_qca, btrtl, and btmrvl HCI drivers - Fixes to parsing invalid L2CAP config option sizes - Locking fix to bt_accept_enqueue() - Add support for new Marvel sd8977 chipset - Various other smaller fixes & cleanups ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 65228bfa4487..d32077b28433 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -831,8 +831,6 @@ static int hci_sock_release(struct socket *sock)
if (!sk)
return 0;
- hdev = hci_pi(sk)->hdev;
-
switch (hci_pi(sk)->channel) {
case HCI_CHANNEL_MONITOR:
atomic_dec(&monitor_promisc);
@@ -854,6 +852,7 @@ static int hci_sock_release(struct socket *sock)
bt_sock_unlink(&hci_sk_list, sk);
+ hdev = hci_pi(sk)->hdev;
if (hdev) {
if (hci_pi(sk)->channel == HCI_CHANNEL_USER) {
/* When releasing a user channel exclusive access,