summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/hci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hci.c b/src/hci.c
index 0aca162f..2447ae9b 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -472,7 +472,7 @@ int hci_for_each_dev(int flag, int (*func)(int dd, int dev_id, long arg), long a
dl->dev_num = HCI_MAX_DEV;
dr = dl->dev_req;
- if (ioctl(sk, HCIGETDEVLIST, (void *) dl))
+ if (ioctl(sk, HCIGETDEVLIST, (void *) dl) < 0)
goto free;
for (i = 0; i < dl->dev_num; i++, dr++) {