summaryrefslogtreecommitdiff
path: root/net/nfc/rawsock.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-06-28 13:47:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-28 13:47:53 -0400
commitde03309bd209b6fb025e9359266e0cbb441f7441 (patch)
tree043d6e7b97a2febe412b40aa253baa2a1be3e3f1 /net/nfc/rawsock.c
parenta969dd139cc2f2bccdcb11894f0695517cf84d4d (diff)
parentc9015b24b262bc7ea56cfd5d78983a73fb5ebd7d (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
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 ec1134c9e07f..8b8a6a2b2bad 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);