aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2022-09-09 20:46:33 +0100
committerDaniel Golle <daniel@makrotopia.org>2022-09-09 21:08:37 +0100
commitf755c4103814cc99fd2c9701ba05aaff1884fc89 (patch)
tree05386dd4f50e972bcdbcc681665ef66779f11304 /target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
parentf97fbd8a9adb481d195cecbcf0b1b19322dc9709 (diff)
downloadupstream-f755c4103814cc99fd2c9701ba05aaff1884fc89.tar.gz
upstream-f755c4103814cc99fd2c9701ba05aaff1884fc89.tar.bz2
upstream-f755c4103814cc99fd2c9701ba05aaff1884fc89.zip
kernel: backport MediaTek USB Bluetooth additions
Backport commits from linux.git adding support for various MT7921 Bluetooth USB IDs. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch')
-rw-r--r--target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
new file mode 100644
index 0000000000..b324cb1aa8
--- /dev/null
+++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
@@ -0,0 +1,29 @@
+From af774a731f7b4c2a90a8476cd44045ba8d1263ba Mon Sep 17 00:00:00 2001
+From: David Yang <davidcomponentone@gmail.com>
+Date: Wed, 13 Oct 2021 08:56:33 +0800
+Subject: [PATCH 2/5] Bluetooth: btusb: Fix application of sizeof to pointer
+
+The coccinelle check report:
+"./drivers/bluetooth/btusb.c:2239:36-42:
+ERROR: application of sizeof to pointer".
+Using the real size to fix it.
+
+Fixes: 5a87679ffd443 ("Bluetooth: btusb: Support public address configuration for MediaTek Chip.")
+Reported-by: Zeal Robot <zealci@zte.com.cn>
+Signed-off-by: David Yang <davidcomponentone@gmail.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+---
+ drivers/bluetooth/btusb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -2268,7 +2268,7 @@ static int btusb_set_bdaddr_mtk(struct h
+ struct sk_buff *skb;
+ long ret;
+
+- skb = __hci_cmd_sync(hdev, 0xfc1a, sizeof(bdaddr), bdaddr, HCI_INIT_TIMEOUT);
++ skb = __hci_cmd_sync(hdev, 0xfc1a, 6, bdaddr, HCI_INIT_TIMEOUT);
+ if (IS_ERR(skb)) {
+ ret = PTR_ERR(skb);
+ bt_dev_err(hdev, "changing Mediatek device address failed (%ld)",