Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328272
b: refs/heads/master
c: 52da244
h: refs/heads/master
v: v3
  • Loading branch information
Wei Yongjun authored and Samuel Ortiz committed Sep 24, 2012
1 parent 9be6b97 commit ab79801
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33e5971358c37851137b264f815977507c016fac
refs/heads/master: 52da2449e10039d3bb04c598d24cb1a34530b716
14 changes: 9 additions & 5 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
u8 *miux_tlv, miux_length;
__be16 miux;
u8 gb_len = 0;
int ret = 0;

version = LLCP_VERSION_11;
version_tlv = nfc_llcp_build_tlv(LLCP_TLV_VERSION, &version,
Expand All @@ -450,8 +451,8 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
gb_len += ARRAY_SIZE(llcp_magic);

if (gb_len > NFC_MAX_GT_LEN) {
kfree(version_tlv);
return -EINVAL;
ret = -EINVAL;
goto out;
}

gb_cur = local->gb;
Expand All @@ -471,12 +472,15 @@ static int nfc_llcp_build_gb(struct nfc_llcp_local *local)
memcpy(gb_cur, miux_tlv, miux_length);
gb_cur += miux_length;

local->gb_len = gb_len;

out:
kfree(version_tlv);
kfree(lto_tlv);
kfree(wks_tlv);
kfree(miux_tlv);

local->gb_len = gb_len;

return 0;
return ret;
}

u8 *nfc_llcp_general_bytes(struct nfc_dev *dev, size_t *general_bytes_len)
Expand Down

0 comments on commit ab79801

Please sign in to comment.