|
@@ -8643,7 +8643,8 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
|
|
|
/* We get here if we can't use the current device name */
|
|
|
if (!pat)
|
|
|
goto out;
|
|
|
- if (dev_get_valid_name(net, dev, pat) < 0)
|
|
|
+ err = dev_get_valid_name(net, dev, pat);
|
|
|
+ if (err < 0)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
@@ -8655,7 +8656,6 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
|
|
|
dev_close(dev);
|
|
|
|
|
|
/* And unlink it from device chain */
|
|
|
- err = -ENODEV;
|
|
|
unlist_netdevice(dev);
|
|
|
|
|
|
synchronize_net();
|