projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dec827d
)
[TIPC]: Remove redundant NULL check when discarding buffers
author
Allan Stephens
<allan.stephens@windriver.com>
Wed, 16 Apr 2008 02:01:43 +0000
(19:01 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 16 Apr 2008 02:01:43 +0000
(19:01 -0700)
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>
net/tipc/core.h
patch
|
blob
|
history
diff --git
a/net/tipc/core.h
b/net/tipc/core.h
index
3fe9b70
..
3229d29
100644
(file)
--- 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