diff options
author | David S. Miller | 2009-11-17 00:05:02 -0800 |
---|---|---|
committer | David S. Miller | 2009-11-17 00:05:02 -0800 |
commit | a2bfbc072e279ff81e6b336acff612b9bc2e5281 (patch) | |
tree | 89cfe21911e1539e1b7f89d8a10d42abecba2a18 /net/core | |
parent | 5c427ff9e4cc61625d48172ea082ae99e21eea6a (diff) | |
parent | 82b3cc1a2f5e46300a9dec4a8cc8106dc20a4c23 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/can/Kconfig
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 4b24d79414e3..d867522290b9 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -999,14 +999,15 @@ rollback: ret = notifier_to_errno(ret); if (ret) { - if (err) { - printk(KERN_ERR - "%s: name change rollback failed: %d.\n", - dev->name, ret); - } else { + /* err >= 0 after dev_alloc_name() or stores the first errno */ + if (err >= 0) { err = ret; memcpy(dev->name, oldname, IFNAMSIZ); goto rollback; + } else { + printk(KERN_ERR + "%s: name change rollback failed: %d.\n", + dev->name, ret); } } |