Commit fce9b9be authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment