Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ae86971 authored by David Ahern's avatar David Ahern Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a68886a6
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -2130,8 +2130,7 @@ static bool fib6_check(struct fib6_info *f6i, u32 cookie)
{
{
	u32 rt_cookie = 0;
	u32 rt_cookie = 0;


	if ((f6i && !fib6_get_cookie_safe(f6i, &rt_cookie)) ||
	if (!fib6_get_cookie_safe(f6i, &rt_cookie) || rt_cookie != cookie)
	     rt_cookie != cookie)
		return false;
		return false;


	if (fib6_check_expired(f6i))
	if (fib6_check_expired(f6i))