Skip to content

Commit

Permalink
NFC: digital: Remove useless call to skb_reserve()
Browse files Browse the repository at this point in the history
When allocating chained I-PDUs, there is no need to call skb_reserve()
since it's already done by digital_alloc_skb() and contains enough room
for the driver head and tail data.

Signed-off-by: Thierry Escande <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
Thierry Escande authored and Samuel Ortiz committed Jul 10, 2016
1 parent 1d984c2 commit e8e7f42
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/nfc/digital_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ digital_send_dep_data_prep(struct nfc_digital_dev *ddev, struct sk_buff *skb,
return ERR_PTR(-ENOMEM);
}

skb_reserve(new_skb, ddev->tx_headroom + NFC_HEADER_SIZE +
DIGITAL_NFC_DEP_REQ_RES_HEADROOM);
memcpy(skb_put(new_skb, ddev->remote_payload_max), skb->data,
ddev->remote_payload_max);
skb_pull(skb, ddev->remote_payload_max);
Expand Down

0 comments on commit e8e7f42

Please sign in to comment.