aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-04-10 13:43:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 15:09:33 -0400
commitb4838d12e1f3cb48c2489a0b08733b5dbf848297 (patch)
tree45d6df434bb8235c42cbbe975ed58ee3d1e76319 /net/nfc
parent673f7786e205c87b5d978c62827b9a66d097bebb (diff)
NFC: Fix the LLCP Tx fragmentation loop
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/llcp/commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/llcp/commands.c b/net/nfc/llcp/commands.c
index 7b76eb7192f3..ef10ffcb4b6f 100644
--- a/net/nfc/llcp/commands.c
+++ b/net/nfc/llcp/commands.c
@@ -474,7 +474,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
474 474
475 while (remaining_len > 0) { 475 while (remaining_len > 0) {
476 476
477 frag_len = min_t(u16, local->remote_miu, remaining_len); 477 frag_len = min_t(size_t, local->remote_miu, remaining_len);
478 478
479 pr_debug("Fragment %zd bytes remaining %zd", 479 pr_debug("Fragment %zd bytes remaining %zd",
480 frag_len, remaining_len); 480 frag_len, remaining_len);
@@ -497,7 +497,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
497 release_sock(sk); 497 release_sock(sk);
498 498
499 remaining_len -= frag_len; 499 remaining_len -= frag_len;
500 msg_ptr += len; 500 msg_ptr += frag_len;
501 } 501 }
502 502
503 kfree(msg_data); 503 kfree(msg_data);