[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208288637-15304-5-git-send-email-allan.stephens@windriver.com>
Date: Tue, 15 Apr 2008 15:43:54 -0400
From: Allan Stephens <allan.stephens@...driver.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, allan.stephens@...driver.com
Subject: [PATCH 4/7 net-2.6.26] [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@...len.de> for
suggesting this enhancement.
Signed-off-by: Allan Stephens <allan.stephens@...driver.com>
---
net/tipc/core.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 3fe9b70..3229d29 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
--
1.5.3.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists