summaryrefslogtreecommitdiffstats
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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index cc52e037440e..a7439aeb1f9b 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -363,10 +363,9 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
switch (state) {
case DISCOVERY_STOPPED:
- hdev->discovery.type = 0;
-
if (hdev->discovery.state != DISCOVERY_STARTING)
mgmt_discovering(hdev, 0);
+ hdev->discovery.type = 0;
break;
case DISCOVERY_STARTING:
break;