From: Jayachandran C Date: Thu, 13 Oct 2005 18:43:02 +0000 (-0700) Subject: [IPV4]: Remove dead code from ip_output.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0d0d2bba97cb091218ea0bcb3d8debcc7bf48397;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [IPV4]: Remove dead code from ip_output.c skb_prev is assigned from skb, which cannot be NULL. This patch removes the unnecessary NULL check. Signed-off-by: Jayachandran C. Acked-by: James Morris Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 1ad5202e556b..87e350069abb 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1023,10 +1023,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, int alloclen; skb_prev = skb; - if (skb_prev) - fraggap = skb_prev->len - maxfraglen; - else - fraggap = 0; + fraggap = skb_prev->len - maxfraglen; alloclen = fragheaderlen + hh_len + fraggap + 15; skb = sock_wmalloc(sk, alloclen, 1, sk->sk_allocation);