diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-30 11:04:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-30 11:04:58 +0300 |
commit | 8a7b5d0f75f757fa88b0d17c19523161b27b8e80 (patch) | |
tree | 54a3e7f1f995583ed924ff32cf5dacc800119800 /net/nfc | |
parent | 7bab01ecc6c43da882333c6db39741cb43677004 (diff) | |
parent | acb1872577b346bd15ab3a3f8dff780d6cca4b70 (diff) | |
download | linux-8a7b5d0f75f757fa88b0d17c19523161b27b8e80.tar.xz |
Merge 4.18-rc7 into usb-next
We want the USB fixes in here as well to handle merge issues.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp_commands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/nfc/llcp_commands.c b/net/nfc/llcp_commands.c index 2ceefa183cee..6a196e438b6c 100644 --- a/net/nfc/llcp_commands.c +++ b/net/nfc/llcp_commands.c @@ -752,11 +752,14 @@ int nfc_llcp_send_ui_frame(struct nfc_llcp_sock *sock, u8 ssap, u8 dsap, pr_debug("Fragment %zd bytes remaining %zd", frag_len, remaining_len); - pdu = nfc_alloc_send_skb(sock->dev, &sock->sk, MSG_DONTWAIT, + pdu = nfc_alloc_send_skb(sock->dev, &sock->sk, 0, frag_len + LLCP_HEADER_SIZE, &err); if (pdu == NULL) { - pr_err("Could not allocate PDU\n"); - continue; + pr_err("Could not allocate PDU (error=%d)\n", err); + len -= remaining_len; + if (len == 0) + len = err; + break; } pdu = llcp_add_header(pdu, dsap, ssap, LLCP_PDU_UI); |