summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-02-25 00:34:41 +0000
committerDavid S. Miller <davem@davemloft.net>2009-02-26 23:07:34 -0800
commit91744f6559393697e13bf0f9f3f35f884e2520f9 (patch)
treeb0f1d8a2145bc5a59147ae9e5660985f389657aa /net/netlink
parent40d44446cf10d9d118e8f0132c94e1f25ea3be97 (diff)
downloadlinux-stable-91744f6559393697e13bf0f9f3f35f884e2520f9.tar.gz
linux-stable-91744f6559393697e13bf0f9f3f35f884e2520f9.tar.bz2
linux-stable-91744f6559393697e13bf0f9f3f35f884e2520f9.zip
netlink: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 2760b62dc2c1..e57d700bf6d9 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1049,8 +1049,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 pid,
netlink_unlock_table();
- if (info.skb2)
- kfree_skb(info.skb2);
+ kfree_skb(info.skb2);
if (info.delivery_failure)
return -ENOBUFS;
@@ -1542,8 +1541,7 @@ EXPORT_SYMBOL(netlink_set_nonroot);
static void netlink_destroy_callback(struct netlink_callback *cb)
{
- if (cb->skb)
- kfree_skb(cb->skb);
+ kfree_skb(cb->skb);
kfree(cb);
}