Skip to content

Commit 8ae8697

Browse files
dsaherndavem330
authored andcommitted
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>
1 parent a68886a commit 8ae8697

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

net/ipv6/route.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,8 +2130,7 @@ static bool fib6_check(struct fib6_info *f6i, u32 cookie)
21302130
{
21312131
u32 rt_cookie = 0;
21322132

2133-
if ((f6i && !fib6_get_cookie_safe(f6i, &rt_cookie)) ||
2134-
rt_cookie != cookie)
2133+
if (!fib6_get_cookie_safe(f6i, &rt_cookie) || rt_cookie != cookie)
21352134
return false;
21362135

21372136
if (fib6_check_expired(f6i))

0 commit comments

Comments
 (0)