From: Frederic Danis <frederic.danis@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v5 3/4] Bluetooth: btintel: Fix calls to __hci_cmd_sync()
Date: Fri, 15 May 2015 11:58:41 +0200 [thread overview]
Message-ID: <1431683922-20418-3-git-send-email-frederic.danis@linux.intel.com> (raw)
In-Reply-To: <1431683922-20418-1-git-send-email-frederic.danis@linux.intel.com>
Remove test of command reply status as it is already performed by
__hci_cmd_sync().
__hci_cmd_sync_ev() function already returns an error if it got a
non-zero status either through a Command Complete or a Command
Status event.
For both of these events the status is collected up in the event
handlers called by hci_event_packet() and then passed as the second
parameter to req_complete_skb(). The req_complete_skb() callback in
turn is hci_req_sync_complete() for __hci_cmd_sync_ev() which stores
the status in hdev->req_result. The hdev->req_result is then further
converted through bt_to_errno() back in __hci_cmd_sync_ev().
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
---
drivers/bluetooth/btintel.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c
index 2d43d42..828f2f8 100644
--- a/drivers/bluetooth/btintel.c
+++ b/drivers/bluetooth/btintel.c
@@ -53,12 +53,6 @@ int btintel_check_bdaddr(struct hci_dev *hdev)
}
bda = (struct hci_rp_read_bd_addr *)skb->data;
- if (bda->status) {
- BT_ERR("%s: Intel device address result failed (%02x)",
- hdev->name, bda->status);
- kfree_skb(skb);
- return -bt_to_errno(bda->status);
- }
/* For some Intel based controllers, the default Bluetooth device
* address 00:03:19:9E:8B:00 can be found. These controllers are
--
1.9.1
next prev parent reply other threads:[~2015-05-15 9:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 9:58 [PATCH v5 1/4] Bluetooth: Fix calls to __hci_cmd_sync() Frederic Danis
2015-05-15 9:58 ` [PATCH v5 2/4] Bluetooth: btusb: " Frederic Danis
2015-05-15 14:06 ` Marcel Holtmann
2015-05-15 9:58 ` Frederic Danis [this message]
2015-05-15 14:06 ` [PATCH v5 3/4] Bluetooth: btintel: " Marcel Holtmann
2015-05-15 9:58 ` [PATCH v5 4/4] Bluetooth: btbcm: " Frederic Danis
2015-05-15 14:06 ` Marcel Holtmann
2015-05-15 14:06 ` [PATCH v5 1/4] Bluetooth: " Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431683922-20418-3-git-send-email-frederic.danis@linux.intel.com \
--to=frederic.danis@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).