summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-17 00:05:02 -0800
committerDavid S. Miller <davem@davemloft.net>2009-11-17 00:05:02 -0800
commita2bfbc072e279ff81e6b336acff612b9bc2e5281 (patch)
tree89cfe21911e1539e1b7f89d8a10d42abecba2a18 /net/core/dev.c
parent5c427ff9e4cc61625d48172ea082ae99e21eea6a (diff)
parent82b3cc1a2f5e46300a9dec4a8cc8106dc20a4c23 (diff)
downloadop-kernel-dev-a2bfbc072e279ff81e6b336acff612b9bc2e5281.zip
op-kernel-dev-a2bfbc072e279ff81e6b336acff612b9bc2e5281.tar.gz
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/dev.c')
-rw-r--r--net/core/dev.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4b24d79..d867522 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);
}
}
OpenPOWER on IntegriCloud