Skip to content

Commit

Permalink
Bluetooth: hci_uart: Fix uninitialized alignment value
Browse files Browse the repository at this point in the history
Force alignment value to the default one (1 byte) if uninitialized.
This fixes hci_ll serdev driver (alignment = 0) and avoid any further
issues with upcoming drivers.

Signed-off-by: Loic Poulain <loic.poulain@gmail.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
  • Loading branch information
Loic Poulain authored and Johan Hedberg committed Jul 31, 2017
1 parent c3327bd commit fb77648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
const struct h4_recv_pkt *pkts, int pkts_count)
{
struct hci_uart *hu = hci_get_drvdata(hdev);
u8 alignment = hu->alignment;
u8 alignment = hu->alignment ? hu->alignment : 1;

while (count) {
int i, len;
Expand Down

0 comments on commit fb77648

Please sign in to comment.