From: Hagen Paul Pfeifer Date: Wed, 31 Mar 2010 14:54:46 +0000 (+0000) Subject: ipv4: remove redundant verification code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d4fc6dbb5ae51430e35b2005f6d68938861f8d8b;p=linux-beck.git ipv4: remove redundant verification code 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 644dc43a55de..f4b47acbf7b6 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -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;