diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 63ccd9f2dccc..b9bd2723f89a 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -325,7 +325,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ifreq *ifr) 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