NFC: llcp: Fix usage of llcp_add_tlv()
authorThierry Escande <thierry.escande@collabora.com>
Wed, 29 Jun 2016 08:48:22 +0000 (10:48 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Jul 2016 08:02:06 +0000 (10:02 +0200)
commitde9e5aeb4f40e72fa3bb087d378c9bd4ecf65c7f
treede94e9274726f79bfe73129ae1c76cc1d246f1d5
parent204bddcb508fe3bca5c97a9f528bafd7ba8fcec8
NFC: llcp: Fix usage of llcp_add_tlv()

In functions using llcp_add_tlv(), a skb pointer could be set to NULL
and then reuse afterward.

With this patch, the skb pointer returned by llcp_add_tlv() is ignored
since it can only be the passed skb pointer or NULL when the passed TLV
is NULL. There is also no need to check for the TLV pointer as this is
done by llcp_add_tlv().

Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp_commands.c