summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-04-10 19:43:03 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 15:09:33 -0400
commitb4838d12e1f3cb48c2489a0b08733b5dbf848297 (patch)
tree45d6df434bb8235c42cbbe975ed58ee3d1e76319 /net
parent673f7786e205c87b5d978c62827b9a66d097bebb (diff)
downloadlinux-b4838d12e1f3cb48c2489a0b08733b5dbf848297.tar.gz
linux-b4838d12e1f3cb48c2489a0b08733b5dbf848297.tar.bz2
linux-b4838d12e1f3cb48c2489a0b08733b5dbf848297.zip
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')
-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,
while (remaining_len > 0) {
- frag_len = min_t(u16, local->remote_miu, remaining_len);
+ frag_len = min_t(size_t, local->remote_miu, remaining_len);
pr_debug("Fragment %zd bytes remaining %zd",
frag_len, remaining_len);
@@ -497,7 +497,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
release_sock(sk);
remaining_len -= frag_len;
- msg_ptr += len;
+ msg_ptr += frag_len;
}
kfree(msg_data);