diff options
Diffstat (limited to 'net/nfc/llcp_sock.c')
-rw-r--r-- | net/nfc/llcp_sock.c | 5 |
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, | |||
508 | pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx, | 508 | pr_debug("%p %d %d %d\n", sk, llcp_sock->target_idx, |
509 | llcp_sock->dsap, llcp_sock->ssap); | 509 | llcp_sock->dsap, llcp_sock->ssap); |
510 | 510 | ||
511 | uaddr->sa_family = AF_NFC; | 511 | memset(llcp_addr, 0, sizeof(*llcp_addr)); |
512 | |||
513 | *len = sizeof(struct sockaddr_nfc_llcp); | 512 | *len = sizeof(struct sockaddr_nfc_llcp); |
514 | 513 | ||
514 | llcp_addr->sa_family = AF_NFC; | ||
515 | llcp_addr->dev_idx = llcp_sock->dev->idx; | 515 | llcp_addr->dev_idx = llcp_sock->dev->idx; |
516 | llcp_addr->target_idx = llcp_sock->target_idx; | 516 | llcp_addr->target_idx = llcp_sock->target_idx; |
517 | llcp_addr->nfc_protocol = llcp_sock->nfc_protocol; | ||
517 | llcp_addr->dsap = llcp_sock->dsap; | 518 | llcp_addr->dsap = llcp_sock->dsap; |
518 | llcp_addr->ssap = llcp_sock->ssap; | 519 | llcp_addr->ssap = llcp_sock->ssap; |
519 | llcp_addr->service_name_len = llcp_sock->service_name_len; | 520 | llcp_addr->service_name_len = llcp_sock->service_name_len; |