summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-04-21 00:38:03 +0200
committerDavid S. Miller <davem@davemloft.net>2018-04-21 22:06:14 +0200
commit8ae869714ba377c93d5dc546b97c0aeaba90b3c9 (patch)
tree482fdfb31458861648701b908a46450d455fc470 /net/ipv6/route.c
parentnet/ipv6: Make from in rt6_info rcu protected (diff)
downloadlinux-8ae869714ba377c93d5dc546b97c0aeaba90b3c9.tar.xz
linux-8ae869714ba377c93d5dc546b97c0aeaba90b3c9.zip
net/ipv6: Remove unncessary check on f6i in fib6_check
Dan reported an imbalance in fib6_check on use of f6i and checking whether it is null. Since fib6_check is only called if f6i is non-null, remove the unnecessary check. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv6/route.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 004d00fe2fe5..0407bbc5a028 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2130,8 +2130,7 @@ static bool fib6_check(struct fib6_info *f6i, u32 cookie)
{
u32 rt_cookie = 0;
- if ((f6i && !fib6_get_cookie_safe(f6i, &rt_cookie)) ||
- rt_cookie != cookie)
+ if (!fib6_get_cookie_safe(f6i, &rt_cookie) || rt_cookie != cookie)
return false;
if (fib6_check_expired(f6i))