summaryrefslogtreecommitdiffstats
path: root/net/nfc/llcp_commands.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-01-17 14:43:17 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-01-17 14:43:17 -0500
commit7916a075571f0ccd0830cf3da293188a8b6045e3 (patch)
tree119c5bb9e513c8205efed485c2dc7b8271123326 /net/nfc/llcp_commands.c
parentcf84eb0b09c0f09b4c70a648b9dfeec78be61f07 (diff)
parente4e19c031901e95dc7d1cf0a2c9c50525d71651f (diff)
downloadlinux-7916a075571f0ccd0830cf3da293188a8b6045e3.tar.gz
linux-7916a075571f0ccd0830cf3da293188a8b6045e3.tar.bz2
linux-7916a075571f0ccd0830cf3da293188a8b6045e3.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'net/nfc/llcp_commands.c')
-rw-r--r--net/nfc/llcp_commands.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/nfc/llcp_commands.c b/net/nfc/llcp_commands.c
index 693cd1aad582..bec6ed15f503 100644
--- a/net/nfc/llcp_commands.c
+++ b/net/nfc/llcp_commands.c
@@ -675,7 +675,7 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
do {
remote_miu = sock->remote_miu > LLCP_MAX_MIU ?
- local->remote_miu : sock->remote_miu;
+ LLCP_DEFAULT_MIU : sock->remote_miu;
frag_len = min_t(size_t, remote_miu, remaining_len);
@@ -684,8 +684,10 @@ int nfc_llcp_send_i_frame(struct nfc_llcp_sock *sock,
pdu = llcp_allocate_pdu(sock, LLCP_PDU_I,
frag_len + LLCP_SEQUENCE_SIZE);
- if (pdu == NULL)
+ if (pdu == NULL) {
+ kfree(msg_data);
return -ENOMEM;
+ }
skb_put(pdu, LLCP_SEQUENCE_SIZE);