Bluetooth: hci_uart: Fix uninitialized alignment value

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>
This commit is contained in:
Loic Poulain 2017-07-29 19:32:31 +02:00 committed by Johan Hedberg
parent c3327bde51
commit fb776481c4

View File

@ -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;