diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 55c999cbe6e9..0b8a2ea0909f 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -316,7 +316,7 @@ static int ipip6_tunnel_get_prl(struct ip_tunnel *t, rcu_read_lock(); - ca = t->prl_count < cmax ? t->prl_count : cmax; + ca = min(t->prl_count, cmax); if (!kp) { /* We don't try hard to allocate much memory for