summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 84431b86af96..8f9df768f250 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2726,8 +2726,8 @@ int hci_dev_cmd(unsigned int cmd, void __user *arg)
changed = !test_and_set_bit(HCI_CONNECTABLE,
&hdev->dev_flags);
else
- changed = test_and_set_bit(HCI_CONNECTABLE,
- &hdev->dev_flags);
+ changed = test_and_clear_bit(HCI_CONNECTABLE,
+ &hdev->dev_flags);
if (changed)
mgmt_new_settings(hdev);