From: zhong jiang Date: Thu, 20 Sep 2018 09:37:43 +0000 (+0800) Subject: ipv4: remove redundant null pointer check before kfree_skb X-Git-Tag: v5.4-rc1~2266^2~303^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d08962ff1e65e29019e5df07188413a85769a9d;p=platform%2Fkernel%2Flinux-rpi.git ipv4: remove redundant null pointer check before kfree_skb kfree_skb has taken the null pointer into account. hence it is safe to remove the redundant null pointer check before kfree_skb. Signed-off-by: zhong jiang Signed-off-by: David S. Miller --- diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index da930b0..13f4d18 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -260,8 +260,7 @@ out: spin_unlock(&qp->q.lock); out_rcu_unlock: rcu_read_unlock(); - if (head) - kfree_skb(head); + kfree_skb(head); ipq_put(qp); }