Skip to content

Commit

Permalink
Bluetooth: hci_intel: Show error in case of invalid LPM packet size
Browse files Browse the repository at this point in the history
Don't hide this packet size error.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Loic Poulain authored and Marcel Holtmann committed Sep 17, 2015
1 parent 74cdad3 commit 1b19757
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/bluetooth/hci_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,11 @@ static int intel_recv_lpm(struct hci_dev *hdev, struct sk_buff *skb)

switch (lpm->opcode) {
case LPM_OP_TX_NOTIFY:
if (lpm->dlen)
intel_recv_lpm_notify(hdev, lpm->data[0]);
if (lpm->dlen < 1) {
bt_dev_err(hu->hdev, "Invalid LPM notification packet");
break;
}
intel_recv_lpm_notify(hdev, lpm->data[0]);
break;
case LPM_OP_SUSPEND_ACK:
set_bit(STATE_SUSPENDED, &intel->flags);
Expand Down

0 comments on commit 1b19757

Please sign in to comment.