mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 23:25:13 -04:00
Bluetooth: btusb: Simplify btusb_recv_bulk() by hci_acl_dlen()
Simplify btusb_recv_bulk() by using hci_acl_dlen() instead of: __le16 dlen = hci_acl_hdr(skb)->dlen; ... __le16_to_cpu(dlen) ... Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
committed by
Luiz Augusto von Dentz
parent
b1ffea37f7
commit
16ca59d36b
@@ -1379,10 +1379,8 @@ static int btusb_recv_bulk(struct btusb_data *data, void *buffer, int count)
|
||||
hci_skb_expect(skb) -= len;
|
||||
|
||||
if (skb->len == HCI_ACL_HDR_SIZE) {
|
||||
__le16 dlen = hci_acl_hdr(skb)->dlen;
|
||||
|
||||
/* Complete ACL header */
|
||||
hci_skb_expect(skb) = __le16_to_cpu(dlen);
|
||||
hci_skb_expect(skb) = hci_acl_dlen(skb);
|
||||
|
||||
if (skb_tailroom(skb) < hci_skb_expect(skb)) {
|
||||
kfree_skb(skb);
|
||||
|
||||
Reference in New Issue
Block a user