Remove noisy printks from llcp_sock_connect
authorDave Jones <davej@redhat.com>
Thu, 4 Oct 2012 09:51:11 +0000 (09:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Oct 2012 19:58:47 +0000 (15:58 -0400)
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>
net/nfc/llcp/sock.c

index 40f056debf9aaecd1fc7993a186a21230a111856..63e4cdc92376eb20e0569c34a5c167d1332c4e78 100644 (file)
@@ -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);