Skip to content

Commit 0d092f0

Browse files
committed
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Johan Hedberg says: ==================== pull request: bluetooth 2018-08-23 Here are two important Bluetooth fixes for the MediaTek and RealTek HCI drivers. Please let me know if there are any issues pulling, thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 6bfde2e + addb3ff commit 0d092f0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/bluetooth/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ config BT_HCIUART_RTL
200200
depends on BT_HCIUART
201201
depends on BT_HCIUART_SERDEV
202202
depends on GPIOLIB
203+
depends on ACPI
203204
select BT_HCIUART_3WIRE
204205
select BT_RTL
205206
help

drivers/bluetooth/btmtkuart.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ static int mtk_setup_fw(struct hci_dev *hdev)
144144
fw_size = fw->size;
145145

146146
/* The size of patch header is 30 bytes, should be skip */
147-
if (fw_size < 30)
148-
return -EINVAL;
147+
if (fw_size < 30) {
148+
err = -EINVAL;
149+
goto free_fw;
150+
}
149151

150152
fw_size -= 30;
151153
fw_ptr += 30;
@@ -172,8 +174,8 @@ static int mtk_setup_fw(struct hci_dev *hdev)
172174
fw_ptr += dlen;
173175
}
174176

177+
free_fw:
175178
release_firmware(fw);
176-
177179
return err;
178180
}
179181

0 commit comments

Comments
 (0)