summaryrefslogtreecommitdiff
path: root/net/nfc/llcp_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/llcp_sock.c')
-rw-r--r--net/nfc/llcp_sock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index 38f08c31cdd8..380253eccb74 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -508,12 +508,13 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,
pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx,
llcp_sock->dsap, llcp_sock->ssap);
- uaddr->sa_family = AF_NFC;
-
+ memset(llcp_addr, 0, sizeof(*llcp_addr));
*len = sizeof(struct sockaddr_nfc_llcp);
+ llcp_addr->sa_family = AF_NFC;
llcp_addr->dev_idx = llcp_sock->dev->idx;
llcp_addr->target_idx = llcp_sock->target_idx;
+ llcp_addr->nfc_protocol = llcp_sock->nfc_protocol;
llcp_addr->dsap = llcp_sock->dsap;
llcp_addr->ssap = llcp_sock->ssap;
llcp_addr->service_name_len = llcp_sock->service_name_len;