Skip to content

Commit

Permalink
ipv6: Remove superfluous NULL pointer check in ipv6_local_rxpmtu
Browse files Browse the repository at this point in the history
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 <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Steffen Klassert authored and David S. Miller committed Oct 19, 2011
1 parent 1d97437 commit c113464
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/ipv6/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c113464

Please sign in to comment.