summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-17 09:05:02 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-17 09:05:02 +0100
commita2bfbc072e279ff81e6b336acff612b9bc2e5281 (patch)
tree89cfe21911e1539e1b7f89d8a10d42abecba2a18 /net/core
parentKS8695: fix ks8695_rx() unreasonable action. (diff)
parentppp: fix BUG on non-linear SKB (multilink receive) (diff)
downloadlinux-a2bfbc072e279ff81e6b336acff612b9bc2e5281.tar.xz
linux-a2bfbc072e279ff81e6b336acff612b9bc2e5281.zip
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.c11
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);
}
}