summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r--drivers/bluetooth/btusb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 3876fee6ad13..5cf0734eb31b 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2762,8 +2762,10 @@ static int btusb_mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
2762 fw_size = fw->size; 2762 fw_size = fw->size;
2763 2763
2764 /* The size of patch header is 30 bytes, should be skip */ 2764 /* The size of patch header is 30 bytes, should be skip */
2765 if (fw_size < 30) 2765 if (fw_size < 30) {
2766 err = -EINVAL;
2766 goto err_release_fw; 2767 goto err_release_fw;
2768 }
2767 2769
2768 fw_size -= 30; 2770 fw_size -= 30;
2769 fw_ptr += 30; 2771 fw_ptr += 30;