Skip to content

Commit b111e4e

Browse files
NicolasDichteldavem330
authored andcommitted
netns: minor cleanup in rtnl_net_getid()
No need to initialize err, it will be overridden by the value of nlmsg_parse(). Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e0e8db2 commit b111e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/net_namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ static int rtnl_net_getid(struct sk_buff *skb, struct nlmsghdr *nlh)
565565
struct net *net = sock_net(skb->sk);
566566
struct nlattr *tb[NETNSA_MAX + 1];
567567
struct sk_buff *msg;
568-
int err = -ENOBUFS;
569568
struct net *peer;
569+
int err;
570570

571571
err = nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, NETNSA_MAX,
572572
rtnl_net_policy);

0 commit comments

Comments
 (0)