diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2013-06-11 17:01:08 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-12 15:08:14 -0700 |
commit | 944a1376b6ca1f00cc67f7d319afd55d5d9afba5 (patch) | |
tree | 1c4cb41d8fc07b8d6b6161e018084d7f74256f57 /drivers/net/tun.c | |
parent | 274038f8c94c493e2977983e2aecb5f5f0778479 (diff) |
tun: Turn tun_flow_init() into void fn
This routine doesn't fail since 9fdc6bef (tuntap: dont use a private kmem_cache)
so it makes sense to compact the code a little bit.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b90a73165d3..a3442706546 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -841,7 +841,7 @@ static const struct net_device_ops tap_netdev_ops = { #endif }; -static int tun_flow_init(struct tun_struct *tun) +static void tun_flow_init(struct tun_struct *tun) { int i; @@ -852,8 +852,6 @@ static int tun_flow_init(struct tun_struct *tun) setup_timer(&tun->flow_gc_timer, tun_flow_cleanup, (unsigned long)tun); mod_timer(&tun->flow_gc_timer, round_jiffies_up(jiffies + tun->ageing_time)); - - return 0; } static void tun_flow_uninit(struct tun_struct *tun) @@ -1662,10 +1660,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) goto err_free_dev; tun_net_init(dev); - - err = tun_flow_init(tun); - if (err < 0) - goto err_free_dev; + tun_flow_init(tun); dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | TUN_USER_FEATURES; |