]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netns: minor cleanup in rtnl_net_getid()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 7 Apr 2015 09:51:52 +0000 (11:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Apr 2015 21:29:41 +0000 (17:29 -0400)
No need to initialize err, it will be overridden by the value of nlmsg_parse().

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c

index e7345d9031df18f1b52d87a8f2b501d0e76e1e4a..be28afccfbbb4213e09ebc8d5a75ca2b2cf647d1 100644 (file)
@@ -565,8 +565,8 @@ static int rtnl_net_getid(struct sk_buff *skb, struct nlmsghdr *nlh)
        struct net *net = sock_net(skb->sk);
        struct nlattr *tb[NETNSA_MAX + 1];
        struct sk_buff *msg;
-       int err = -ENOBUFS;
        struct net *peer;
+       int err;
 
        err = nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, NETNSA_MAX,
                          rtnl_net_policy);