ipv4: remove redundant verification code
authorHagen Paul Pfeifer <hagen@jauu.net>
Wed, 31 Mar 2010 14:54:46 +0000 (14:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Apr 2010 01:38:47 +0000 (18:38 -0700)
The check if error signaling is wanted (inet->recverr != 0) is done by
the caller: raw.c:raw_err() and udp.c:__udp4_lib_err(), so there is no
need to check this condition again.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_sockglue.c

index 644dc43a55dec954dc7232b3edb58c3412951540..f4b47acbf7b6f79ca3e68d56a4bd9649925ed0e6 100644 (file)
@@ -286,12 +286,8 @@ int ip_ra_control(struct sock *sk, unsigned char on,
 void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
                   __be16 port, u32 info, u8 *payload)
 {
-       struct inet_sock *inet = inet_sk(sk);
        struct sock_exterr_skb *serr;
 
-       if (!inet->recverr)
-               return;
-
        skb = skb_clone(skb, GFP_ATOMIC);
        if (!skb)
                return;