Re: [PATCH 2/2] Bluetooth: Add __hci_cmd_sync() helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Wed, Apr 3, 2013 at 1:12 PM, Anderson Lizardo
<anderson.lizardo@xxxxxxxxxxxxx> wrote:
> Hi Johan,
>
> On Wed, Apr 3, 2013 at 9:52 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
>> +       switch (hdev->req_status) {
>> +       case HCI_REQ_DONE:
>> +               err = -bt_to_errno(hdev->req_result);
>> +               break;
>> +
>> +       case HCI_REQ_CANCELED:
>> +               err = -hdev->req_result;
>> +               break;
>> +
>> +       default:
>> +               err = -ETIMEDOUT;
>> +               break;
>> +       }
>> +
>> +       hdev->req_status = hdev->req_result = 0;
>> +
>> +       BT_DBG("%s end: err %d", hdev->name, err);
>> +
>> +       if (err < 0)
>> +               return ERR_PTR(err);
>
> Isn't this always true (due to the switch() avove) ?

Ignore that, req_result might be zero...

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - 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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux