diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 16e75a996b74..07c2c6f4f7e3 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -312,7 +312,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