diff options
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/llcp/sock.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 6152d05f8378..ddeb9aa398f0 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -294,6 +294,9 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr, | |||
294 | struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); | 294 | struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); |
295 | DECLARE_SOCKADDR(struct sockaddr_nfc_llcp *, llcp_addr, uaddr); | 295 | DECLARE_SOCKADDR(struct sockaddr_nfc_llcp *, llcp_addr, uaddr); |
296 | 296 | ||
297 | if (llcp_sock == NULL || llcp_sock->dev == NULL) | ||
298 | return -EBADFD; | ||
299 | |||
297 | pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx, | 300 | pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx, |
298 | llcp_sock->dsap, llcp_sock->ssap); | 301 | llcp_sock->dsap, llcp_sock->ssap); |
299 | 302 | ||