From: Steffen Klassert Date: Tue, 11 Oct 2011 02:01:02 +0000 (+0000) Subject: ipv6: Remove superfluous NULL pointer check in ipv6_local_rxpmtu X-Git-Tag: next-20111025~57^2~76 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c113464d4351591de8791c0cadfc165836e5a725;p=karo-tx-linux.git ipv6: Remove superfluous NULL pointer check in ipv6_local_rxpmtu The pointer to mtu_info is taken from the common buffer of the skb, thus it can't be a NULL pointer. This patch removes this check on mtu_info. Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller --- diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index b46e9f88ce37..e2480691c220 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -297,10 +297,6 @@ void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu) ipv6_addr_copy(&iph->daddr, &fl6->daddr); mtu_info = IP6CBMTU(skb); - if (!mtu_info) { - kfree_skb(skb); - return; - } mtu_info->ip6m_mtu = mtu; mtu_info->ip6m_addr.sin6_family = AF_INET6;