summaryrefslogtreecommitdiffstats
path: root/net/nfc/rawsock.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-29 12:07:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-29 12:07:37 -0400
commit42fb0b0278e6b9a44bee8adec051de5f43e10b2b (patch)
treef53513819d11445385346cf75be05054dae3438d /net/nfc/rawsock.c
parent34202e28fe7fc8551313f9a035a8857db83de757 (diff)
parentc9015b24b262bc7ea56cfd5d78983a73fb5ebd7d (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/nfc/rawsock.c')
-rw-r--r--net/nfc/rawsock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index ec1134c9e07..8b8a6a2b2ba 100644
--- a/net/nfc/rawsock.c
+++ b/net/nfc/rawsock.c
@@ -54,7 +54,10 @@ static int rawsock_release(struct socket *sock)
{
struct sock *sk = sock->sk;
- pr_debug("sock=%p\n", sock);
+ pr_debug("sock=%p sk=%p\n", sock, sk);
+
+ if (!sk)
+ return 0;
sock_orphan(sk);
sock_put(sk);