summaryrefslogtreecommitdiffstats
path: root/net/nfc/nci/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/nci/core.c')
-rw-r--r--net/nfc/nci/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 61fff422424f..17b9f1ce23db 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -462,7 +462,7 @@ int nci_nfcc_loopback(struct nci_dev *ndev, void *data, size_t data_len,
return -ENOMEM;
skb_reserve(skb, NCI_DATA_HDR_SIZE);
- memcpy(skb_put(skb, data_len), data, data_len);
+ skb_put_data(skb, data, data_len);
loopback_data.conn_id = conn_id;
loopback_data.data = skb;
@@ -1350,7 +1350,7 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload)
nci_pbf_set((__u8 *)hdr, NCI_PBF_LAST);
if (plen)
- memcpy(skb_put(skb, plen), payload, plen);
+ skb_put_data(skb, payload, plen);
skb_queue_tail(&ndev->cmd_q, skb);
queue_work(ndev->cmd_wq, &ndev->cmd_work);