netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] af_key: remove some pointless conditionals before kfree_skb()
@ 2009-02-25 10:31 Wei Yongjun
  2009-02-27  7:08 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2009-02-25 10:31 UTC (permalink / raw)
  To: David Miller, netdev

Remove some pointless conditionals before kfree_skb().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/key/af_key.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7dcbde3..643c1be 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -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;
 }
-- 
1.5.3.8





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-27  7:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-25 10:31 [PATCH] af_key: remove some pointless conditionals before kfree_skb() Wei Yongjun
2009-02-27  7:08 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).