diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:19:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:19:13 -0800 |
| commit | a27c6530ff12bab100e64c5b43e84f759fa353ae (patch) | |
| tree | b8a7b6abedf07872d2e5f8f6175390f362fbf47b /net/core/dev.c | |
| parent | dfc52b82fee5bc6713ecce3f81767a8565c4f874 (diff) | |
v2.4.9.12 -> v2.4.9.13
- Manfred Spraul: /proc/pid/maps cleanup (and bugfix for non-x86)
- Al Viro: "block device fs" - cleanup of page cache handling
- Hugh Dickins: VM/shmem cleanups and swap search speedup
- David Miller: sparc updates, soc driver typo fix, net updates
- Jeff Garzik: network driver updates (dl2k, yellowfin and tulip)
- Neil Brown: knfsd cleanups and fixues
- Ben LaHaise: zap_page_range merge from -ac
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 5f215ba103e8..d39c4a03ccd7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2445,8 +2445,12 @@ int register_netdevice(struct net_device *dev) dev->iflink = -1; /* Init, if this function is available */ - if (dev->init && dev->init(dev) != 0) + if (dev->init && dev->init(dev) != 0) { +#ifdef CONFIG_NET_DIVERT + free_divert_blk(dev); +#endif return -EIO; + } dev->ifindex = dev_new_index(); if (dev->iflink == -1) @@ -2455,6 +2459,9 @@ int register_netdevice(struct net_device *dev) /* Check for existence, and append to tail of chain */ for (dp=&dev_base; (d=*dp) != NULL; dp=&d->next) { if (d == dev || strcmp(d->name, dev->name) == 0) { +#ifdef CONFIG_NET_DIVERT + free_divert_blk(dev); +#endif return -EEXIST; } } |
