summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/hcitool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 85404afc..2ad26bfe 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -1973,7 +1973,7 @@ static void cmd_clock(int dev_id, int argc, char **argv)
else
bacpy(&bdaddr, BDADDR_ANY);
- if (!bacmp(&bdaddr, BDADDR_ANY))
+ if (dev_id < 0 && !bacmp(&bdaddr, BDADDR_ANY))
dev_id = hci_get_route(NULL);
if (dev_id < 0) {