Skip to content

Commit

Permalink
ipv6: Remove redundant dst NULL check in ip6_dst_check
Browse files Browse the repository at this point in the history
As the only path leading to ip6_dst_check makes an indirect call
through dst->ops, dst cannot be NULL in ip6_dst_check.

This patch removes this check in case it misleads people who
come across this code.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Mar 20, 2010
1 parent d11a4dc commit 1041444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)

rt = (struct rt6_info *) dst;

if (rt && rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
return dst;

return NULL;
Expand Down

0 comments on commit 1041444

Please sign in to comment.