Commit dc1650fc authored by David Yang's avatar David Yang Committed by Marcel Holtmann

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: 5a87679f ("Bluetooth: btusb: Support public address configuration for MediaTek Chip.")
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarDavid Yang <davidcomponentone@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent f5ff2910
......@@ -2236,7 +2236,7 @@ static int btusb_set_bdaddr_mtk(struct hci_dev *hdev, const bdaddr_t *bdaddr)
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)",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment