From: Adrian Bunk Date: Mon, 15 Oct 2007 08:37:55 +0000 (-0700) Subject: [IPV6] __inet6_csk_dst_store(): fix check-after-use X-Git-Tag: v2.6.24-rc1~1277^2~28 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dff92e09eb3adfcf3d3dffd0507b850f911f280;p=linux-2.6 [IPV6] __inet6_csk_dst_store(): fix check-after-use The Coverity checker spotted that we have already oops'ed if "dst" was NULL. Since "dst" being NULL doesn't seem to be possible at this point this patch removes the NULL check. Signed-off-by: Adrian Bunk Acked-by: Masahide NAKAMURA Acked-by: Noriaki TAKAMIYA Signed-off-by: David S. Miller --- diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 25b9317097..78de42ada8 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -146,7 +146,7 @@ void __inet6_csk_dst_store(struct sock *sk, struct dst_entry *dst, __ip6_dst_store(sk, dst, daddr, saddr); #ifdef CONFIG_XFRM - if (dst) { + { struct rt6_info *rt = (struct rt6_info *)dst; rt->rt6i_flow_cache_genid = atomic_read(&flow_cache_genid); }