Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Loic Poulain and committed by
Johan Hedberg
fb776481 c3327bde

+1 -1
+1 -1
drivers/bluetooth/hci_h4.c
··· 172 172 const struct h4_recv_pkt *pkts, int pkts_count) 173 173 { 174 174 struct hci_uart *hu = hci_get_drvdata(hdev); 175 - u8 alignment = hu->alignment; 175 + u8 alignment = hu->alignment ? hu->alignment : 1; 176 176 177 177 while (count) { 178 178 int i, len;