Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9641d343 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg
Browse files

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: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent ecffc804
Loading
Loading
Loading
Loading
+10 −16
Original line number Diff line number Diff line
@@ -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,7 +1353,6 @@ 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.
@@ -1364,16 +1362,12 @@ static int btusb_setup_csr(struct hci_dev *hdev)
		/* 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);
		}
		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,