提交 11ecede7 编写于 作者: A Allan Stephens 提交者: 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: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dec827d1
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册