diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index d023f879e7bb..b694fbf44a35 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2601,7 +2601,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, case TCP_REPAIR_QUEUE: if (!tp->repair) err = -EPERM; - else if (val < TCP_QUEUES_NR) + else if ((unsigned int)val < TCP_QUEUES_NR) tp->repair_queue = val; else err = -EINVAL;