Hi Andrei, On Fri, Nov 26, 2010 at 11:22 AM, Emeltchenko Andrei <Andrei.Emeltchenko.news@xxxxxxxxx> wrote: > @@ -430,7 +433,8 @@ int hci_inquiry(void __user *arg) > hci_dev_unlock_bh(hdev); > > timeo = ir.length * msecs_to_jiffies(2000); > - if (do_inquiry && (err = hci_request(hdev, hci_inq_req, (unsigned long)&ir, timeo)) < 0) > + err = hci_request(hdev, hci_inq_req, (unsigned long)&ir, timeo); > + if (do_inquiry && err < 0) > goto done; I think there is a problem here. the "do_inquiry" flag will be checked *after* the inquiry request is done. Maybe you should do something like: if (do_inquiry) { err = hci_request(hdev, hci_inq_req, (unsigned long)&ir, timeo); if (err < 0) goto done; } Regards, -- Anderson Lizardo OpenBossa Labs - INdT Manaus - Brazil -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html