Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Petri Gynther <pgynther@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Petri Gynther and committed by
Marcel Holtmann
ad750fa1 2791b44d

+2 -1
+2 -1
drivers/bluetooth/btbcm.c
··· 467 467 err = request_firmware(&fw, fw_name, &hdev->dev); 468 468 if (err < 0) { 469 469 BT_INFO("%s: BCM: Patch %s not found", hdev->name, fw_name); 470 - return 0; 470 + goto done; 471 471 } 472 472 473 473 btbcm_patchram(hdev, fw); ··· 501 501 BT_INFO("%s: %s", hdev->name, (char *)(skb->data + 1)); 502 502 kfree_skb(skb); 503 503 504 + done: 504 505 btbcm_check_bdaddr(hdev); 505 506 506 507 set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);