Skip to content

Commit

Permalink
NFC: Fix the LLCP Tx fragmentation loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz authored and linvjw committed Apr 11, 2012
1 parent 673f778 commit b4838d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/nfc/llcp/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit b4838d1

Please sign in to comment.