aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-04-15 22:01:43 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-15 22:01:43 -0400
commit11ecede7874efb9c31184b49090fc6d9bb17f9f6 (patch)
tree6d21d6986c74fa835fd4ff602e1de7a93ee69594 /net/tipc
parentdec827d174d7f76c457238800183ca864a639365 (diff)
[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 <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/core.h3
1 files changed, 1 insertions, 2 deletions
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)
334 334
335static inline void buf_discard(struct sk_buff *skb) 335static inline void buf_discard(struct sk_buff *skb)
336{ 336{
337 if (likely(skb != NULL)) 337 kfree_skb(skb);
338 kfree_skb(skb);
339} 338}
340 339
341#endif 340#endif