summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_h4.c
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@gmail.com>2017-07-29 20:32:31 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2017-07-31 13:27:37 +0300
commitfb776481c4ffd9bf8d4dc091ea66c3a93bdfcb35 (patch)
treee68970debb2cb80cbaa4daf12c6cc37d9de0f9e2 /drivers/bluetooth/hci_h4.c
parentc3327bde514d5945f5de1e28bed3eaa0c4d622ec (diff)
downloadlinux-fb776481c4ffd9bf8d4dc091ea66c3a93bdfcb35.tar.xz
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>
Diffstat (limited to 'drivers/bluetooth/hci_h4.c')
-rw-r--r--drivers/bluetooth/hci_h4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 4e328d7d47bb..3b82a87224a9 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -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;