]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
core: remove some pointless conditionals before kfree_skb()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 25 Feb 2009 00:37:32 +0000 (00:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2009 07:07:36 +0000 (23:07 -0800)
Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/neighbour.c
net/core/skbuff.c

index e1144cb94b9954592ff7bb83581bec0077e44e98..417b6d739fb7b440119af9ae267f50d5a891fc78 100644 (file)
@@ -871,8 +871,7 @@ static void neigh_timer_handler(unsigned long arg)
                write_unlock(&neigh->lock);
                neigh->ops->solicit(neigh, skb);
                atomic_inc(&neigh->probes);
-               if (skb)
-                       kfree_skb(skb);
+               kfree_skb(skb);
        } else {
 out:
                write_unlock(&neigh->lock);
@@ -908,8 +907,7 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
                        neigh->updated = jiffies;
                        write_unlock_bh(&neigh->lock);
 
-                       if (skb)
-                               kfree_skb(skb);
+                       kfree_skb(skb);
                        return 1;
                }
        } else if (neigh->nud_state & NUD_STALE) {
index 33640d99c8ed65794458f4a673e45724232ef520..e5e2111a397d1d0559ab171c663b5f50c457a2ce 100644 (file)
@@ -1208,8 +1208,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
                                        insp = list;
                                }
                                if (!pskb_pull(list, eat)) {
-                                       if (clone)
-                                               kfree_skb(clone);
+                                       kfree_skb(clone);
                                        return NULL;
                                }
                                break;