Commit 395950f8 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: dev_alloc_name() returns the number of the slot used, so comparison needs to be < 0

parent 98a51ec0
......@@ -696,7 +696,7 @@ int dev_change_name(struct net_device *dev, char *newname)
if (strchr(newname, '%')) {
int err = dev_alloc_name(dev, newname);
if (err)
if (err < 0)
return err;
strcpy(newname, dev->name);
}
......
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