mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08: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 @@ replay:
|
||||
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