Skip to content

Commit

Permalink
Bluetooth: mediatek: pass correct size to h4_recv_buf()
Browse files Browse the repository at this point in the history
We're supposed to pass the number of elements in the mtk_recv_pkts, not
the number of bytes.

Fixes: 7237c4c ("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>
  • Loading branch information
Dan Carpenter authored and Marcel Holtmann committed Aug 13, 2018
1 parent a487711 commit 330ad75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bluetooth/btmtkuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 330ad75

Please sign in to comment.