Commit ad750fa1 authored by Petri Gynther's avatar Petri Gynther Committed by Marcel Holtmann
Browse files

Bluetooth: btbcm: Fix handling of firmware not found



If the call to request_firmware() fails in btbcm_setup_patchram(),
the BCM chip will be operating with its default firmware.

In this case, btbcm_setup_patchram() should not return immediately
but instead should skip to btbcm_check_bdaddr() and quirk setup.

Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 2791b44d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ int btbcm_setup_patchram(struct hci_dev *hdev)
	err = request_firmware(&fw, fw_name, &hdev->dev);
	if (err < 0) {
		BT_INFO("%s: BCM: Patch %s not found", hdev->name, fw_name);
		return 0;
		goto done;
	}

	btbcm_patchram(hdev, fw);
@@ -501,6 +501,7 @@ int btbcm_setup_patchram(struct hci_dev *hdev)
	BT_INFO("%s: %s", hdev->name, (char *)(skb->data + 1));
	kfree_skb(skb);

done:
	btbcm_check_bdaddr(hdev);

	set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);