From: Allan Stephens Date: Wed, 16 Apr 2008 02:01:43 +0000 (-0700) Subject: [TIPC]: Remove redundant NULL check when discarding buffers X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=11ecede7874efb9c31184b49090fc6d9bb17f9f6;p=deliverable%2Flinux.git [TIPC]: Remove redundant NULL check when discarding buffers This patch eliminates a null pointer check when discarding a TIPC message buffer, since kfree_skb() already handles this situation. Acknowledgements to Florian Westphal (fw@strlen.de> for suggesting this enhancement. Signed-off-by: Allan Stephens Signed-off-by: David S. Miller --- diff --git a/net/tipc/core.h b/net/tipc/core.h index 3fe9b70331d9..3229d29e352a 100644 --- a/net/tipc/core.h +++ b/net/tipc/core.h @@ -334,8 +334,7 @@ static inline struct sk_buff *buf_acquire(u32 size) static inline void buf_discard(struct sk_buff *skb) { - if (likely(skb != NULL)) - kfree_skb(skb); + kfree_skb(skb); } #endif