af_key: remove some pointless conditionals before kfree_skb()
authorWei Yongjun <yjwei@cn.fujitsu.com>
Wed, 25 Feb 2009 00:31:04 +0000 (00:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2009 07:07:32 +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/key/af_key.c

index 7dcbde3ea7d9e7afdbfd382d8775b28b7fd9ea40..643c1be2d02e85c4622d87830db0b90942cdb2e3 100644 (file)
@@ -313,8 +313,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
        if (one_sk != NULL)
                err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
 
-       if (skb2)
-               kfree_skb(skb2);
+       kfree_skb(skb2);
        kfree_skb(skb);
        return err;
 }
@@ -3573,8 +3572,7 @@ static int pfkey_sendmsg(struct kiocb *kiocb,
 out:
        if (err && hdr && pfkey_error(hdr, err, sk) == 0)
                err = 0;
-       if (skb)
-               kfree_skb(skb);
+       kfree_skb(skb);
 
        return err ? : len;
 }