Commit 11ecede7 authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller

[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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dec827d1
...@@ -334,8 +334,7 @@ static inline struct sk_buff *buf_acquire(u32 size) ...@@ -334,8 +334,7 @@ static inline struct sk_buff *buf_acquire(u32 size)
static inline void buf_discard(struct sk_buff *skb) static inline void buf_discard(struct sk_buff *skb)
{ {
if (likely(skb != NULL)) kfree_skb(skb);
kfree_skb(skb);
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment