cff537a86699ed3aa92163ac1aee81778d911d8c
[openwrt/staging/stintel.git] /
1 From af774a731f7b4c2a90a8476cd44045ba8d1263ba Mon Sep 17 00:00:00 2001
2 From: David Yang <davidcomponentone@gmail.com>
3 Date: Wed, 13 Oct 2021 08:56:33 +0800
4 Subject: [PATCH 2/5] Bluetooth: btusb: Fix application of sizeof to pointer
5
6 The coccinelle check report:
7 "./drivers/bluetooth/btusb.c:2239:36-42:
8 ERROR: application of sizeof to pointer".
9 Using the real size to fix it.
10
11 Fixes: 5a87679ffd443 ("Bluetooth: btusb: Support public address configuration for MediaTek Chip.")
12 Reported-by: Zeal Robot <zealci@zte.com.cn>
13 Signed-off-by: David Yang <davidcomponentone@gmail.com>
14 Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 ---
16 drivers/bluetooth/btusb.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/bluetooth/btusb.c
20 +++ b/drivers/bluetooth/btusb.c
21 @@ -2277,7 +2277,7 @@ static int btusb_set_bdaddr_mtk(struct h
22 struct sk_buff *skb;
23 long ret;
24
25 - skb = __hci_cmd_sync(hdev, 0xfc1a, sizeof(bdaddr), bdaddr, HCI_INIT_TIMEOUT);
26 + skb = __hci_cmd_sync(hdev, 0xfc1a, 6, bdaddr, HCI_INIT_TIMEOUT);
27 if (IS_ERR(skb)) {
28 ret = PTR_ERR(skb);
29 bt_dev_err(hdev, "changing Mediatek device address failed (%ld)",