mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Bluetooth: Fix returning proper HCI status from __hci_req_sync
There were a couple of code paths missed by the previous patch that added a HCI status return parameter to __hci_req_sync. This patch adds the missing assignments for them. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
40b25fe5dc
commit
568f44f636
1 changed files with 7 additions and 1 deletions
|
|
@ -220,8 +220,14 @@ int __hci_req_sync(struct hci_dev *hdev, int (*func)(struct hci_request *req,
|
|||
* trigger any commands to be sent. This is normal behavior
|
||||
* and should not trigger an error return.
|
||||
*/
|
||||
if (err == -ENODATA)
|
||||
if (err == -ENODATA) {
|
||||
if (hci_status)
|
||||
*hci_status = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hci_status)
|
||||
*hci_status = HCI_ERROR_UNSPECIFIED;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue