diff options
Diffstat (limited to 'net/nfc/rawsock.c')
-rw-r--r-- | net/nfc/rawsock.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index 5e9b991eac13..11ac0a17156e 100644 --- a/net/nfc/rawsock.c +++ b/net/nfc/rawsock.c | |||
@@ -208,13 +208,10 @@ static int rawsock_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
208 | if (sock->state != SS_CONNECTED) | 208 | if (sock->state != SS_CONNECTED) |
209 | return -ENOTCONN; | 209 | return -ENOTCONN; |
210 | 210 | ||
211 | skb = sock_alloc_send_skb(sk, len + dev->tx_headroom + dev->tx_tailroom + NFC_HEADER_SIZE, | 211 | skb = nfc_alloc_send_skb(dev, sk, msg->msg_flags, len, &rc); |
212 | msg->msg_flags & MSG_DONTWAIT, &rc); | 212 | if (skb == NULL) |
213 | if (!skb) | ||
214 | return rc; | 213 | return rc; |
215 | 214 | ||
216 | skb_reserve(skb, dev->tx_headroom + NFC_HEADER_SIZE); | ||
217 | |||
218 | rc = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len); | 215 | rc = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len); |
219 | if (rc < 0) { | 216 | if (rc < 0) { |
220 | kfree_skb(skb); | 217 | kfree_skb(skb); |