diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-11-23 13:40:47 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-23 13:50:11 +0100 |
commit | 568f44f63621e00af9895f09c70aa38025be8813 (patch) | |
tree | 1ddec04421d48c132e12797030355155a1d0cbd4 /net | |
parent | Bluetooth: Add support for Get Advertising Size Information command (diff) | |
download | linux-568f44f63621e00af9895f09c70aa38025be8813.tar.xz linux-568f44f63621e00af9895f09c70aa38025be8813.zip |
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 <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_request.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 76bd912be9fe..e639671f54bd 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -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; } |