summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-06-07 10:01:01 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2015-06-08 11:55:26 +0200
commit9641d3435f76dfa9255974acebc64d5794889e77 (patch)
treeea12c00ad6efa55ebd93efa44c27a09e611f245c /drivers
parentBluetooth: btusb: Fix memory leak in Intel setup routine (diff)
downloadlinux-9641d3435f76dfa9255974acebc64d5794889e77.tar.xz
linux-9641d3435f76dfa9255974acebc64d5794889e77.zip
Bluetooth: btusb: Remove double error check from local version command
The __hci_cmd_sync function already handles the command status and command complete errors. No need to check the status field again. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/btusb.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 7f936db169f5..317b276441af 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1344,7 +1344,6 @@ static int btusb_setup_csr(struct hci_dev *hdev)
{
struct hci_rp_read_local_version *rp;
struct sk_buff *skb;
- int ret;
BT_DBG("%s", hdev->name);
@@ -1354,26 +1353,21 @@ static int btusb_setup_csr(struct hci_dev *hdev)
rp = (struct hci_rp_read_local_version *)skb->data;
- if (!rp->status) {
- if (le16_to_cpu(rp->manufacturer) != 10) {
- /* Clear the reset quirk since this is not an actual
- * early Bluetooth 1.1 device from CSR.
- */
- clear_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
+ if (le16_to_cpu(rp->manufacturer) != 10) {
+ /* Clear the reset quirk since this is not an actual
+ * early Bluetooth 1.1 device from CSR.
+ */
+ clear_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
- /* These fake CSR controllers have all a broken
- * stored link key handling and so just disable it.
- */
- set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY,
- &hdev->quirks);
- }
+ /* These fake CSR controllers have all a broken
+ * stored link key handling and so just disable it.
+ */
+ set_bit(HCI_QUIRK_BROKEN_STORED_LINK_KEY, &hdev->quirks);
}
- ret = -bt_to_errno(rp->status);
-
kfree_skb(skb);
- return ret;
+ return 0;
}
static const struct firmware *btusb_setup_intel_get_fw(struct hci_dev *hdev,