diff options
-rw-r--r-- | net/nfc/llcp/sock.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/nfc/llcp/sock.c b/net/nfc/llcp/sock.c index 40f056debf9a..63e4cdc92376 100644 --- a/net/nfc/llcp/sock.c +++ b/net/nfc/llcp/sock.c | |||
@@ -497,15 +497,11 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr, | |||
497 | pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags); | 497 | pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags); |
498 | 498 | ||
499 | if (!addr || len < sizeof(struct sockaddr_nfc) || | 499 | if (!addr || len < sizeof(struct sockaddr_nfc) || |
500 | addr->sa_family != AF_NFC) { | 500 | addr->sa_family != AF_NFC) |
501 | pr_err("Invalid socket\n"); | ||
502 | return -EINVAL; | 501 | return -EINVAL; |
503 | } | ||
504 | 502 | ||
505 | if (addr->service_name_len == 0 && addr->dsap == 0) { | 503 | if (addr->service_name_len == 0 && addr->dsap == 0) |
506 | pr_err("Missing service name or dsap\n"); | ||
507 | return -EINVAL; | 504 | return -EINVAL; |
508 | } | ||
509 | 505 | ||
510 | pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n", addr->dev_idx, | 506 | pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n", addr->dev_idx, |
511 | addr->target_idx, addr->nfc_protocol); | 507 | addr->target_idx, addr->nfc_protocol); |