summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-08-13 12:32:35 +0300
committerMarcel Holtmann <marcel@holtmann.org>2018-08-13 15:59:39 +0200
commit330ad75f6a79d46f11f7bf8937852ebb4673b1d5 (patch)
treef5b2940a264f053a97886256db70217026f78840 /drivers/bluetooth
parenta487711aac3b720b4a3a63d737604f47cd8dc36c (diff)
downloadlinux-330ad75f6a79d46f11f7bf8937852ebb4673b1d5.tar.bz2
Bluetooth: mediatek: pass correct size to h4_recv_buf()
We're supposed to pass the number of elements in the mtk_recv_pkts, not the number of bytes. Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmtkuart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c
index e0571fe04d00..ed2a5c7cb77f 100644
--- a/drivers/bluetooth/btmtkuart.c
+++ b/drivers/bluetooth/btmtkuart.c
@@ -346,7 +346,7 @@ static int btmtkuart_recv(struct hci_dev *hdev, const u8 *data, size_t count)
bdev->rx_skb = h4_recv_buf(bdev->hdev, bdev->rx_skb, p_h4,
sz_h4, mtk_recv_pkts,
- sizeof(mtk_recv_pkts));
+ ARRAY_SIZE(mtk_recv_pkts));
if (IS_ERR(bdev->rx_skb)) {
err = PTR_ERR(bdev->rx_skb);
bt_dev_err(bdev->hdev,