NFC: Fix LLCP sockets releasing path
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 5 Mar 2012 00:03:51 +0000 (01:03 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 6 Mar 2012 20:16:24 +0000 (15:16 -0500)
commit40c75f81d6852bb4fd08491074889187f77b8d1f
tree456956512172a11d67a811e15277d5e0a56387c0
parent47807d3dbb62e93850cbcb797db1a9ee1806f986
NFC: Fix LLCP sockets releasing path

The socket local pointer needs to be set to NULL when the adapter is
removed or the MAC goes down.
If the socket release code is called after such an event, the socket
reference count still needs to be decreased in order for the socket to
eventually be freed.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/nfc/llcp/llcp.c
net/nfc/llcp/sock.c