]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/tipc/socket.c
tipc: remove redundant checking for the number of iovecs in a send request
[karo-tx-linux.git] / net / tipc / socket.c
index cbe2f6ecf07ac960c120e49aa5a45844792af559..a9622b6cd91689ae17ae92b9226c3705067a1a8a 100644 (file)
@@ -503,8 +503,7 @@ static int send_msg(struct kiocb *iocb, struct socket *sock,
        if (unlikely((m->msg_namelen < sizeof(*dest)) ||
                     (dest->family != AF_TIPC)))
                return -EINVAL;
-       if ((total_len > TIPC_MAX_USER_MSG_SIZE) ||
-           (m->msg_iovlen > (unsigned int)INT_MAX))
+       if (total_len > TIPC_MAX_USER_MSG_SIZE)
                return -EMSGSIZE;
 
        if (iocb)
@@ -612,8 +611,7 @@ static int send_packet(struct kiocb *iocb, struct socket *sock,
        if (unlikely(dest))
                return send_msg(iocb, sock, m, total_len);
 
-       if ((total_len > TIPC_MAX_USER_MSG_SIZE) ||
-           (m->msg_iovlen > (unsigned int)INT_MAX))
+       if (total_len > TIPC_MAX_USER_MSG_SIZE)
                return -EMSGSIZE;
 
        if (iocb)
@@ -698,8 +696,7 @@ static int send_stream(struct kiocb *iocb, struct socket *sock,
                goto exit;
        }
 
-       if ((total_len > (unsigned int)INT_MAX) ||
-           (m->msg_iovlen > (unsigned int)INT_MAX)) {
+       if (total_len > (unsigned int)INT_MAX) {
                res = -EMSGSIZE;
                goto exit;
        }