提交 fce9b9be 编写于 作者: D Dan Carpenter 提交者: David S. Miller

rtnetlink: remove an unneeded test

We know that "dev" is a valid pointer at this point, so we can remove
the test and clean up a little.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f36f0920
......@@ -1867,10 +1867,10 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
else
err = register_netdevice(dev);
if (err < 0 && !IS_ERR(dev))
if (err < 0) {
free_netdev(dev);
if (err < 0)
goto out;
}
err = rtnl_configure_link(dev, ifm);
if (err < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册