mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f36f092065
commit
fce9b9be89
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user