lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH next-next 1/2] net: vlan: remove unnecessary err variable in vlan_init_net()
Date
Return vlan_init_net() directly in vlan_init_net(), remove unnecessary
err variable. Thus code looks more concise.

Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
---
net/8021q/vlan.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index e40aa3e3641c..aaef80fdd852 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -658,13 +658,10 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
static int __net_init vlan_init_net(struct net *net)
{
struct vlan_net *vn = net_generic(net, vlan_net_id);
- int err;

vn->name_type = VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD;

- err = vlan_proc_init(net);
-
- return err;
+ return vlan_proc_init(net);
}

static void __net_exit vlan_exit_net(struct net *net)
--
2.25.1
\
 
 \ /
  Last update: 2022-08-31 06:10    [W:0.055 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site