Skip to content

Commit

Permalink
Remove noisy printks from llcp_sock_connect
Browse files Browse the repository at this point in the history
Validation of userspace input shouldn't trigger dmesg spamming.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dave Jones authored and David S. Miller committed Oct 4, 2012
1 parent 19d4e66 commit 32418cf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/nfc/llcp/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,15 +497,11 @@ static int llcp_sock_connect(struct socket *sock, struct sockaddr *_addr,
pr_debug("sock %p sk %p flags 0x%x\n", sock, sk, flags);

if (!addr || len < sizeof(struct sockaddr_nfc) ||
addr->sa_family != AF_NFC) {
pr_err("Invalid socket\n");
addr->sa_family != AF_NFC)
return -EINVAL;
}

if (addr->service_name_len == 0 && addr->dsap == 0) {
pr_err("Missing service name or dsap\n");
if (addr->service_name_len == 0 && addr->dsap == 0)
return -EINVAL;
}

pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n", addr->dev_idx,
addr->target_idx, addr->nfc_protocol);
Expand Down

0 comments on commit 32418cf

Please sign in to comment.