mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
NFC: Fix LLCP TLV building routine
The if logic could lead to zero length TLVs. Signed-off-by: Samuel Ortiz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
279cf174ae
commit
324b0af6f5
1 changed files with 1 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ u8 *nfc_llcp_build_tlv(u8 type, u8 *value, u8 value_length, u8 *tlv_length)
|
|||
length = llcp_tlv_length[type];
|
||||
if (length == 0 && value_length == 0)
|
||||
return NULL;
|
||||
else
|
||||
else if (length == 0)
|
||||
length = value_length;
|
||||
|
||||
*tlv_length = 2 + length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue